remove invalid errors for valid queries without results
This commit is contained in:
parent
45eea6515c
commit
c439865a1f
@ -115,8 +115,10 @@ static VALUE rb_mysql_client_query(VALUE self, VALUE sql) {
|
|||||||
|
|
||||||
result = mysql_store_result(client);
|
result = mysql_store_result(client);
|
||||||
if (result == NULL) {
|
if (result == NULL) {
|
||||||
// lookup error code and msg, raise exception
|
if (mysql_field_count(client) != 0) {
|
||||||
fprintf(stdout, "mysql_store_result error: %s\n", mysql_error(client));
|
// lookup error code and msg, raise exception
|
||||||
|
fprintf(stdout, "mysql_store_result error: (%d) %s\n", mysql_errno(client), mysql_error(client));
|
||||||
|
}
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
return rb_mysql_result_to_obj(result);
|
return rb_mysql_result_to_obj(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user