Commit 1263e1f0 authored by unknown's avatar unknown

merging

parent 5e849120
...@@ -2699,7 +2699,8 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row) ...@@ -2699,7 +2699,8 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
int4store(buff, stmt->stmt_id); int4store(buff, stmt->stmt_id);
int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */ int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH, if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH,
buff, sizeof(buff), NullS, 0, 1)) buff, sizeof(buff), NullS, 0,
1, NULL))
{ {
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate); set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
return 1; return 1;
...@@ -4948,7 +4949,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags) ...@@ -4948,7 +4949,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
char buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */ char buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */
int4store(buff, stmt->stmt_id); int4store(buff, stmt->stmt_id);
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff, if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff,
sizeof(buff), 0, 0, 0)) sizeof(buff), 0, 0, 0, NULL))
{ {
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno, set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
mysql->net.sqlstate); mysql->net.sqlstate);
......
...@@ -387,20 +387,6 @@ static MYSQL_RES * emb_store_result(MYSQL *mysql) ...@@ -387,20 +387,6 @@ static MYSQL_RES * emb_store_result(MYSQL *mysql)
return mysql_store_result(mysql); return mysql_store_result(mysql);
} }
my_bool emb_next_result(MYSQL *mysql)
{
THD *thd= (THD*)mysql->thd;
DBUG_ENTER("emb_next_result");
if (emb_advanced_command(mysql, COM_QUERY,0,0,
thd->query_rest.ptr(),thd->query_rest.length(),
1, NULL) ||
emb_mysql_read_query_result(mysql))
DBUG_RETURN(1);
DBUG_RETURN(0); /* No more results */
}
int emb_read_change_user_result(MYSQL *mysql, int emb_read_change_user_result(MYSQL *mysql,
char *buff __attribute__((unused)), char *buff __attribute__((unused)),
const char *passwd __attribute__((unused))) const char *passwd __attribute__((unused)))
......
...@@ -164,7 +164,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -164,7 +164,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
port=0; port=0;
unix_socket=0; unix_socket=0;
db_name = db ? my_strdup(db,MYF(MY_WME)) : NULL;
/* Send client information for access check */ /* Send client information for access check */
client_flag|=CLIENT_CAPABILITIES; client_flag|=CLIENT_CAPABILITIES;
...@@ -175,7 +174,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -175,7 +174,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
client_flag|=CLIENT_CONNECT_WITH_DB; client_flag|=CLIENT_CONNECT_WITH_DB;
mysql->info_buffer= my_malloc(MYSQL_ERRMSG_SIZE, MYF(0)); mysql->info_buffer= my_malloc(MYSQL_ERRMSG_SIZE, MYF(0));
mysql->thd= create_embedded_thd(client_flag, db_name); mysql->thd= create_embedded_thd(client_flag);
init_embedded_mysql(mysql, client_flag); init_embedded_mysql(mysql, client_flag);
......
...@@ -306,6 +306,7 @@ int check_user(THD *thd, enum enum_server_command command, ...@@ -306,6 +306,7 @@ int check_user(THD *thd, enum enum_server_command command,
/* Send the error to the client */ /* Send the error to the client */
net_send_error(thd); net_send_error(thd);
DBUG_RETURN(-1); DBUG_RETURN(-1);
}
} }
send_ok(thd); send_ok(thd);
DBUG_RETURN(0); DBUG_RETURN(0);
......
...@@ -13100,7 +13100,7 @@ static void test_bug9478() ...@@ -13100,7 +13100,7 @@ static void test_bug9478()
int4store(buff, stmt->stmt_id); int4store(buff, stmt->stmt_id);
buff[4]= 1; /* prefetch rows */ buff[4]= 1; /* prefetch rows */
rc= ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH, buff, rc= ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH, buff,
sizeof(buff), 0,0,1) || sizeof(buff), 0,0,1,NULL) ||
(*mysql->methods->read_query_result)(mysql)); (*mysql->methods->read_query_result)(mysql));
DIE_UNLESS(rc); DIE_UNLESS(rc);
if (!opt_silent && i == 0) if (!opt_silent && i == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment