1
0
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:
dkatz@damien-katzs-computer.local
2007-07-16 14:53:05 -04:00
parent 91f4cb1c8c
commit 639fd4c555
3 changed files with 54 additions and 8 deletions

View File

@ -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 }
};