1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mysql.com:/opt/local/work/mysql-4.1-root

into  mysql.com:/opt/local/work/mysql-5.0-root


libmysql/libmysql.c:
  Manual merge
tests/mysql_client_test.c:
  Manual merge
This commit is contained in:
unknown
2005-07-14 20:02:34 +04:00
2 changed files with 57 additions and 0 deletions

View File

@ -13660,6 +13660,51 @@ static void test_bug9735()
myquery(rc);
}
/* Bug#11183 "mysql_stmt_reset() doesn't reset information about error" */
static void test_bug11183()
{
int rc;
MYSQL_STMT *stmt;
char bug_statement[]= "insert into t1 values (1)";
myheader("test_bug11183");
mysql_query(mysql, "drop table t1 if exists");
mysql_query(mysql, "create table t1 (a int)");
stmt= mysql_stmt_init(mysql);
DIE_UNLESS(stmt != 0);
rc= mysql_stmt_prepare(stmt, bug_statement, strlen(bug_statement));
check_execute(stmt, rc);
rc= mysql_query(mysql, "drop table t1");
myquery(rc);
/* Trying to execute statement that should fail on execute stage */
rc= mysql_stmt_execute(stmt);
DIE_UNLESS(rc);
mysql_stmt_reset(stmt);
DIE_UNLESS(mysql_stmt_errno(stmt) == 0);
mysql_query(mysql, "create table t1 (a int)");
/* Trying to execute statement that should pass ok */
if (mysql_stmt_execute(stmt))
{
mysql_stmt_reset(stmt);
DIE_UNLESS(mysql_stmt_errno(stmt) == 0);
}
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "drop table t1");
myquery(rc);
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
@ -13902,6 +13947,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug11656", test_bug11656 },
{ "test_bug10214", test_bug10214 },
{ "test_bug9735", test_bug9735 },
{ "test_bug11183", test_bug11183 },
{ 0, 0 }
};