diff --git a/libmariadb/mariadb_stmt.c b/libmariadb/mariadb_stmt.c index 4d2bf1cb..d5deff9e 100644 --- a/libmariadb/mariadb_stmt.c +++ b/libmariadb/mariadb_stmt.c @@ -2308,7 +2308,7 @@ int STDCALL mariadb_stmt_execute_direct(MYSQL_STMT *stmt, MYSQL *mysql= stmt->mysql; my_bool emulate_cmd= !(!(stmt->mysql->server_capabilities & CLIENT_MYSQL) && (stmt->mysql->extension->mariadb_server_capabilities & - (MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32))); + (MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32))) || mysql->net.compress; if (!mysql) { diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index 19a3969c..07b5a2f2 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -4638,7 +4638,21 @@ static int test_mdev14165(MYSQL *mysql) 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[] = { + {"test_compress", test_compress, TEST_CONNECTION_NEW, CLIENT_COMPRESS, NULL, NULL}, {"test_conc208", test_conc208, 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},