summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <holyfoot@deer.(none)>2006-01-04 14:20:28 +0400
committerunknown <holyfoot@deer.(none)>2006-01-04 14:20:28 +0400
commit6b27acbdf41dd3c990af4627ddaf8fbfcd8eb4e6 (patch)
treebcb306f8c631b6b3153296059aae11b7e290ded7 /libmysql
parent81ca15813bfc482ac98614de41a867e47dde07d3 (diff)
downloadmariadb-git-6b27acbdf41dd3c990af4627ddaf8fbfcd8eb4e6.tar.gz
Big patch to make embedded-server working in 5.x
Now it supports queries returning several results (particularly important with the SP) include/mysql.h: embedded_query_result structure added libmysql/libmysql.c: embedded-server related fixes libmysqld/emb_qcache.cc: multiple-result support added libmysqld/embedded_priv.h: embedded_query_result struct implemented libmysqld/lib_sql.cc: multiple-result support added libmysqld/libmysqld.c: small fixes mysql-test/t/backup.test: test fixed mysql-test/t/binlog_stm_binlog.test: test fixed mysql-test/t/binlog_stm_blackhole.test: test fixed mysql-test/t/binlog_stm_ctype_cp932.test: test fixed mysql-test/t/compress.test: test fixed mysql-test/t/delayed.test: test fixed mysql-test/t/federated.test: test fixed mysql-test/t/federated_archive.test: test fixed mysql-test/t/federated_bug_13118.test: test fixed mysql-test/t/federated_transactions.test: test fixed mysql-test/t/flush_table.test: test fixed mysql-test/t/handler.test: test fixed mysql-test/t/init_connect.test: test fixed mysql-test/t/innodb.test: test fixed mysql-test/t/mysql.test: test fixed mysql-test/t/mysql_client_test.test: test fixed mysql-test/t/mysqltest.test: test fixed mysql-test/t/query_cache.test: test fixed mysql-test/t/query_cache_notembedded.test: test fixed mysql-test/t/read_only.test: test fixed mysql-test/t/skip_grants.test: test fixed mysql-test/t/sp-destruct.test: test fixed mysql-test/t/sp-error.test: test fixed mysql-test/t/sp-threads.test: test fixed mysql-test/t/sp.test: test fixed mysql-test/t/view.test: test fixed mysql-test/t/wait_timeout.test: test fixed sql-common/client.c: small fixes sql/mysqld.cc: embedded-server related fix sql/protocol.cc: embedded-server related fix sql/protocol.h: embedded-server related fix sql/sql_class.cc: embedded-server related fix sql/sql_class.h: embedded-server related fix sql/sql_cursor.cc: embedded-server related fix sql/sql_parse.cc: embedded-server related fix sql/sql_prepare.cc: embedded-server related fix
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 11ee7284cbf..e2ee44efffb 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -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));
}