diff options
author | unknown <dkatz@damien-katzs-computer.local> | 2007-07-16 14:53:05 -0400 |
---|---|---|
committer | unknown <dkatz@damien-katzs-computer.local> | 2007-07-16 14:53:05 -0400 |
commit | 499a8cfe2d39249155420721e7370d9c33f5bb06 (patch) | |
tree | ae6011049845b705082b3dbb8bdb41958fab225f /tests | |
parent | e641addf78e390fe2ca7aa62712b107a6950d677 (diff) | |
download | mariadb-git-499a8cfe2d39249155420721e7370d9c33f5bb06.tar.gz |
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.
sql/sql_class.h:
Readded comments lost in a bad merge.
sql/sql_insert.cc:
Fixed code to completely initialize (zero) the "COPY_INFO info" var in the same manner as the delayed write code.
Readded a change that was lost in a bad merge.
tests/mysql_client_test.c:
Test case added for bug#29692.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index cb1561ad6f5..51f627a16de 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16272,6 +16272,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 } }; |