1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-16 11:21:15 +03:00

Big patch to make embedded-server working in 5.x

Now it supports queries returning several results
(particularly important with the SP)
This commit is contained in:
holyfoot@deer.(none)
2006-01-04 14:20:28 +04:00
parent 795f744c5f
commit e8697cf428
46 changed files with 1031 additions and 465 deletions

View File

@ -2722,13 +2722,13 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
/* Send row request to the server */
int4store(buff, stmt->stmt_id);
int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
NullS, 0, 1))
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH,
buff, sizeof(buff), NullS, 0, 1))
{
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
return 1;
}
if (cli_read_binary_rows(stmt))
if ((*mysql->methods->read_rows_from_cursor)(stmt))
return 1;
stmt->server_status= mysql->server_status;
@ -5101,9 +5101,9 @@ my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode)
DBUG_ENTER("mysql_autocommit");
DBUG_PRINT("enter", ("mode : %d", auto_mode));
if (auto_mode) /* set to true */
DBUG_RETURN((my_bool) mysql_real_query(mysql, "set autocommit=1", 16));
DBUG_RETURN((my_bool) mysql_real_query(mysql, "set autocommit=0", 16));
DBUG_RETURN((my_bool) mysql_real_query(mysql, auto_mode ?
"set autocommit=1":"set autocommit=0",
16));
}