You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Fix for mariadb_stmt_execute:
If compressed protocol is in use, mariadb_stmt_execute_direct will be emulated by mysql_stmt_prepare and mysql_stmt_execute.
This commit is contained in:
@@ -2308,7 +2308,7 @@ int STDCALL mariadb_stmt_execute_direct(MYSQL_STMT *stmt,
|
|||||||
MYSQL *mysql= stmt->mysql;
|
MYSQL *mysql= stmt->mysql;
|
||||||
my_bool emulate_cmd= !(!(stmt->mysql->server_capabilities & CLIENT_MYSQL) &&
|
my_bool emulate_cmd= !(!(stmt->mysql->server_capabilities & CLIENT_MYSQL) &&
|
||||||
(stmt->mysql->extension->mariadb_server_capabilities &
|
(stmt->mysql->extension->mariadb_server_capabilities &
|
||||||
(MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32)));
|
(MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32))) || mysql->net.compress;
|
||||||
|
|
||||||
if (!mysql)
|
if (!mysql)
|
||||||
{
|
{
|
||||||
|
@@ -4638,7 +4638,21 @@ static int test_mdev14165(MYSQL *mysql)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int test_compress(MYSQL *mysql)
|
||||||
|
{
|
||||||
|
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
rc= mariadb_stmt_execute_direct(stmt, SL("SELECT 1 FROM DUAL"));
|
||||||
|
check_stmt_rc(rc, stmt);
|
||||||
|
|
||||||
|
mysql_stmt_close(stmt);
|
||||||
|
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
struct my_tests_st my_tests[] = {
|
struct my_tests_st my_tests[] = {
|
||||||
|
{"test_compress", test_compress, TEST_CONNECTION_NEW, CLIENT_COMPRESS, NULL, NULL},
|
||||||
{"test_conc208", test_conc208, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_conc208", test_conc208, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
{"test_mdev14165", test_mdev14165, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_mdev14165", test_mdev14165, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
{"test_conc208", test_conc208, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_conc208", test_conc208, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
|
Reference in New Issue
Block a user