-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pkg.test() is failing on Windows 64 bit #40
Comments
I also can't run the tests on x64 windows with a similar error at the same place. It looks like NAs are not being returned correctly. I also had to fiddle with The error is in reading the results - the values appear in MySQL correctly (and the results-as-tuples test works): |
A bit more isolation: it's specifically related to bound select statements and not to either tuples or dataframes: Running the second cell repeatedly produced different types of garbage in place of the nulls each time. As best I can tell, the prepared statement version calls |
The MySQL bug that I mentioned in the comment in mysql_execute(hndl, "DROP USER IF EXISTS 'test'@'127.0.0.1';" ) The NA's not showing up is caused by the fact that |
It looks like I made a mistake while defining the |
I tried to make this change but I don't actually see where there should be a typedef struct st_mysql_bind
{
unsigned long *length; /* output length pointer */
my_bool *is_null; /* Pointer to null indicator */
void *buffer; /* buffer to get/put data */
/* set this if you want to track data truncations happened during fetch */
my_bool *error;
unsigned char *row_ptr; /* for the current data position */
void (*store_param_func)(NET *net, struct st_mysql_bind *param);
void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row);
void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row);
/* output buffer length, must be set when fetching str/binary */
unsigned long buffer_length;
unsigned long offset; /* offset position for char/binary fetch */
unsigned long length_value; /* Used if length is 0 */
unsigned int param_number; /* For null count and error messages */
unsigned int pack_length; /* Internal length for packed data */
enum enum_field_types buffer_type; /* buffer type */
my_bool error_value; /* used if error is 0 */
my_bool is_unsigned; /* set if integer type is unsigned */
my_bool long_data_used; /* If used with mysql_send_long_data */
my_bool is_null_value; /* Used if is_null is 0 */
void *extension;
} MYSQL_BIND; and I don't see a mysql_bind.h anywhere. I think I see two fields in MYSQL_STMT that should be immutable MYSQL_STMT # This is different in mariadb header file.
mem_root::MEM_ROOT
list::LIST
mysql::Ptr{Void}
params::MYSQL_BIND
bind::MYSQL_BIND
fields::MYSQL_FIELD
result::MYSQL_DATA
data_cursor::MYSQL_ROWS
affected_rows::Culonglong #Changed
insert_id::Culonglong #Changed
stmt_id::Culong
flags::Culong
prefetch_rows::Culong
server_status::Cuint
last_errno::Cuint
param_count::Cuint
field_count::Cuint
state::Cuint
last_error::Ptr{Cchar}
sqlstate::Ptr{Cchar}
send_types_to_server::Cint
bind_param_done::Cint
bind_result_done::Cuchar
unbuffered_fetch_cancelled::Cint
update_max_length::Cint
extension::Ptr{Cuchar}
end For the offsets I see immutable MYSQL_BIND
length::Ptr{Culong} # 8
is_null::Ptr{Cchar} # 8
buffer::Ptr{Void} # 8
error::Ptr{Cchar} # 8
row_ptr::Ptr{Cuchar} # 8
store_param_func ::Ptr{Void} # 8
fetch_result ::Ptr{Void} # 8
skip_result ::Ptr{Void} # 8
buffer_length::Culong # sizeof(Clong)
offset::Culong # sizeof(Clong)
length_value::Culong # sizeof(Clong)
param_number :: Cuint # 4
pack_length :: Cuint # 4
buffer_type :: Cint # 4
error_value :: Cchar # 1
is_unsigned :: Cchar # 1
long_data_used :: Cchar # 1
is_null_value :: Cchar
extension :: Ptr{Void} so it looks like the offset should be Miraculously tests pass for me after this change, but someone should check and make sure I didn't break it for other systems. I'll submit a pull request mostly to see if it passes travis. |
Pkg.test() is failing while executing prepared statements when the value is NULL, I've included the exact error message below
Configuration
The text was updated successfully, but these errors were encountered: