diff options
-rw-r--r-- | libmysql/libmysql.c | 13 | ||||
-rw-r--r-- | mysys/default.c | 6 | ||||
-rw-r--r-- | sql/unireg.cc | 8 |
3 files changed, 23 insertions, 4 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index e63a583a0dd..4447ece308e 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2754,12 +2754,13 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, DBUG_RETURN(1); } /* Mark for execute that the result is already sent */ - param->long_data_used= 1; - if (length) + if (length || param->long_data_used == 0) { MYSQL *mysql= stmt->mysql; char *packet, extra_data[MYSQL_LONG_DATA_HEADER]; + param->long_data_used= 1; + packet= extra_data; int4store(packet, stmt->stmt_id); packet+=4; int2store(packet, param_number); packet+=2; @@ -3805,6 +3806,7 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) { char buff[MYSQL_STMT_HEADER]; MYSQL *mysql; + MYSQL_BIND *param, *param_end; DBUG_ENTER("mysql_stmt_reset"); DBUG_ASSERT(stmt != 0); @@ -3820,6 +3822,13 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) mysql->net.sqlstate); DBUG_RETURN(1); } + + /* Clear long_data_used for next call (as we do in mysql_stmt_execute() */ + for (param= stmt->params, param_end= param + stmt->param_count; + param < param_end; + param++) + param->long_data_used= 0; + DBUG_RETURN(0); } diff --git a/mysys/default.c b/mysys/default.c index d09b0dd97af..af67520322f 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -166,6 +166,12 @@ int load_defaults(const char *conf_file, const char **groups, if ((error= search_default_file(&args, &alloc, "", forced_default_file, "", &group)) < 0) goto err; + if (error > 0) + { + fprintf(stderr, "Could not open required defaults file: %s\n", + forced_default_file); + goto err; + } } else if (dirname_length(conf_file)) { diff --git a/sql/unireg.cc b/sql/unireg.cc index 8d3e304b5da..bab021aed59 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -214,9 +214,13 @@ int rea_create_table(THD *thd, my_string file_name, DBUG_ENTER("rea_create_table"); if (mysql_create_frm(thd, file_name, create_info, - create_fields, keys, key_info, NULL) || - ha_create_table(file_name,create_info,0)) + create_fields, keys, key_info, NULL)) DBUG_RETURN(1); + if (ha_create_table(file_name,create_info,0)) + { + my_delete(file_name,MYF(0)); + DBUG_RETURN(1); + } DBUG_RETURN(0); } /* rea_create_table */ |