mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/opt/local/work/mysql-4.1-root
into mysql.com:/opt/local/work/mysql-5.0-root
This commit is contained in:
@ -14714,6 +14714,56 @@ static void test_bug16144()
|
||||
mysql_stmt_close(stmt);
|
||||
}
|
||||
|
||||
|
||||
static void test_bug12744()
|
||||
{
|
||||
MYSQL_STMT *prep_stmt = NULL;
|
||||
int rc;
|
||||
myheader("test_bug12744");
|
||||
|
||||
prep_stmt= mysql_stmt_init(mysql);
|
||||
rc= mysql_stmt_prepare(prep_stmt, "SELECT 1", 8);
|
||||
DIE_UNLESS(rc==0);
|
||||
|
||||
rc= mysql_kill(mysql, mysql_thread_id(mysql));
|
||||
DIE_UNLESS(rc==0);
|
||||
|
||||
if (rc= mysql_stmt_execute(prep_stmt))
|
||||
{
|
||||
if (rc= mysql_stmt_reset(prep_stmt))
|
||||
printf("OK!\n");
|
||||
else
|
||||
{
|
||||
printf("Error!");
|
||||
DIE_UNLESS(1==0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "expected error but no error occured\n");
|
||||
DIE_UNLESS(1==0);
|
||||
}
|
||||
rc= mysql_stmt_close(prep_stmt);
|
||||
}
|
||||
|
||||
/* Bug #16144: mysql_stmt_attr_get type error */
|
||||
|
||||
static void test_bug16144()
|
||||
{
|
||||
const my_bool flag_orig= (my_bool) 0xde;
|
||||
my_bool flag= flag_orig;
|
||||
MYSQL_STMT *stmt;
|
||||
myheader("test_bug16144");
|
||||
|
||||
/* Check that attr_get returns correct data on little and big endian CPUs */
|
||||
stmt= mysql_stmt_init(mysql);
|
||||
mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag);
|
||||
mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag);
|
||||
DIE_UNLESS(flag == flag_orig);
|
||||
|
||||
mysql_stmt_close(stmt);
|
||||
}
|
||||
|
||||
/*
|
||||
Bug #15613: "libmysqlclient API function mysql_stmt_prepare returns wrong
|
||||
field length"
|
||||
@ -15039,7 +15089,7 @@ static struct my_tests_st my_tests[]= {
|
||||
{ "test_bug14845", test_bug14845 },
|
||||
{ "test_bug15510", test_bug15510 },
|
||||
{ "test_opt_reconnect", test_opt_reconnect },
|
||||
|
||||
{ "test_bug12744", test_bug12744 },
|
||||
{ "test_bug16144", test_bug16144 },
|
||||
{ "test_bug15613", test_bug15613 },
|
||||
{ 0, 0 }
|
||||
|
Reference in New Issue
Block a user