mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #29692 Single row inserts can incorrectly report a huge number of row insertions
This bug was caused by unitialized value that was the result of a bad 5.0 merge.
This commit is contained in:
@ -16271,6 +16271,38 @@ static void test_bug27592()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Bug #29692 Single row inserts can incorrectly report a huge number of
|
||||
row insertions
|
||||
*/
|
||||
|
||||
static void test_bug29692()
|
||||
{
|
||||
MYSQL* conn;
|
||||
|
||||
if (!(conn= mysql_init(NULL)))
|
||||
{
|
||||
myerror("test_bug29692 init failed");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!(mysql_real_connect(conn, opt_host, opt_user,
|
||||
opt_password, opt_db ? opt_db:"test", opt_port,
|
||||
opt_unix_socket, CLIENT_FOUND_ROWS)))
|
||||
{
|
||||
myerror("test_bug29692 connection failed");
|
||||
mysql_close(mysql);
|
||||
exit(1);
|
||||
}
|
||||
myquery(mysql_query(conn, "drop table if exists t1"));
|
||||
myquery(mysql_query(conn, "create table t1(f1 int)"));
|
||||
myquery(mysql_query(conn, "insert into t1 values(1)"));
|
||||
DIE_UNLESS(1 == mysql_affected_rows(conn));
|
||||
myquery(mysql_query(conn, "drop table t1"));
|
||||
mysql_close(conn);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Read and parse arguments and MySQL options from my.cnf
|
||||
*/
|
||||
@ -16560,6 +16592,7 @@ static struct my_tests_st my_tests[]= {
|
||||
{ "test_bug28505", test_bug28505 },
|
||||
{ "test_bug28934", test_bug28934 },
|
||||
{ "test_bug27592", test_bug27592 },
|
||||
{ "test_bug29692", test_bug29692 },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user