1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '11.8' into main

This commit is contained in:
Sergei Golubchik
2025-04-18 12:07:02 +02:00
871 changed files with 11314 additions and 6371 deletions

View File

@@ -22886,9 +22886,9 @@ void test_mdev_10075()
DIE_UNLESS(rc == 1);
mysql_free_result(result);
mysql_query(mysql, "drop table t1");
}
#ifndef EMBEDDED_LIBRARY
/*
MDEV-36080: Run a Prepared Statement that hits a failure when the query
@@ -22967,9 +22967,54 @@ static void test_mdev_36080()
rc= mysql_query(mysql, "drop table t0, t1, t2");
myquery(rc);
}
#endif
static void test_mdev35953()
{
int rc;
MYSQL_STMT *stmt;
MYSQL_BIND bind[1];
int vals[]= {1, 2}, count= array_elements(vals);
MYSQL *con= mysql_client_init(NULL);
DIE_UNLESS(con);
if (!mysql_real_connect(con, opt_host, opt_user, opt_password, current_db,
opt_port, opt_unix_socket, 0))
{
fprintf(stderr, "Failed to connect to database: Error: %s\n",
mysql_error(con));
exit(1);
}
rc= mysql_query(mysql, "create table t1 (a int)");
myquery(rc);
stmt= mysql_stmt_init(con);
rc= mysql_stmt_prepare(stmt, "insert into t1 (a) values (?)", -1);
check_execute(stmt, rc);
memset(bind, 0, sizeof(bind));
bind[0].buffer_type = MYSQL_TYPE_LONG;
bind[0].buffer = vals;
mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &count);
rc= mysql_stmt_bind_param(stmt, bind);
check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= mysql_query(mysql, "alter table t1 add xx int");
myquery(rc);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
mysql_stmt_close(stmt);
mysql_close(con);
mysql_query(mysql, "drop table t1");
}
#endif
static struct my_tests_st my_tests[]= {
{ "test_mdev_20516", test_mdev_20516 },
{ "test_mdev24827", test_mdev24827 },
@@ -23290,6 +23335,7 @@ static struct my_tests_st my_tests[]= {
{ "test_mdev_10075", test_mdev_10075},
#ifndef EMBEDDED_LIBRARY
{ "test_mdev_36080", test_mdev_36080},
{ "test_mdev35953", test_mdev35953 },
#endif
{ 0, 0 }
};