mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge mysql.com:/home/kostja/mysql/tmp_merge
into mysql.com:/home/kostja/mysql/mysql-5.1-merge configure.in: Auto merged include/heap.h: Auto merged libmysql/libmysql.c: Auto merged mysql-test/r/date_formats.result: Auto merged mysql-test/t/date_formats.test: Auto merged sql/ha_heap.cc: Auto merged sql/ha_heap.h: Auto merged sql/item_timefunc.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged storage/heap/hp_create.c: Auto merged storage/ndb/include/mgmapi/mgmapi_config_parameters.h: Auto merged storage/ndb/test/ndbapi/testBlobs.cpp: Auto merged sql/sql_update.cc: Manual merge tests/mysql_client_test.c: SCCS merged
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"
|
||||
@@ -15038,6 +15088,7 @@ static struct my_tests_st my_tests[]= {
|
||||
{ "test_bug14845", test_bug14845 },
|
||||
{ "test_opt_reconnect", test_opt_reconnect },
|
||||
{ "test_bug15510", test_bug15510},
|
||||
{ "test_bug12744", test_bug12744 },
|
||||
{ "test_bug16144", test_bug16144 },
|
||||
{ "test_bug15613", test_bug15613 },
|
||||
{ 0, 0 }
|
||||
|
Reference in New Issue
Block a user