exasol / r-exasol

The EXASOL package for R provides an interface to the EXASOL database.
http://www.exasol.com
BSD 3-Clause "New" or "Revised" License
22 stars 8 forks source link

exa.ReadData not working correctly under Windows #103

Closed tomuben closed 2 years ago

tomuben commented 2 years ago

Background

exa.ReadData() is not workign currectly under Windows. The server aborts the connection with following error message:

Error in exa.readData(exaconn, "SELECT * FROM mytable LIMIT 10") :
Could not execute SQL: '42636' -6819666' [EXASOL][EXASolution driver]ETL-5106: Following error occured while writing data to external connection [http://1.2.3.4:8888/executeSQL.csv failed after 985 bytes. [Empty reply from server],[52],[Server returned nothing (no headers, no data)]] (Session: 1713032233724253837)'

RCA

During the refactoring (#63), the magic number = 1 for closing the socket for sending was replaced with SD_RECEIVE, but it should have been replaced with SD_SEND.
The consequence was that the socket might have been closed before the ok answered was sent to the database.