Commit 3a73ef8a authored by konstantin@mysql.com's avatar konstantin@mysql.com

Fix coding style.

parent 88b01808
...@@ -13893,10 +13893,10 @@ static void test_bug12001() ...@@ -13893,10 +13893,10 @@ static void test_bug12001()
MYSQL *mysql_local; MYSQL *mysql_local;
MYSQL_RES *result; MYSQL_RES *result;
const char *query= "DROP TABLE IF EXISTS test_table;" const char *query= "DROP TABLE IF EXISTS test_table;"
"CREATE TABLE test_table(id INT);" "CREATE TABLE test_table(id INT);"
"INSERT INTO test_table VALUES(10);" "INSERT INTO test_table VALUES(10);"
"UPDATE test_table SET id=20 WHERE id=10;" "UPDATE test_table SET id=20 WHERE id=10;"
"SELECT * FROM test_table;" "SELECT * FROM test_table;"
"INSERT INTO non_existent_table VALUES(11);"; "INSERT INTO non_existent_table VALUES(11);";
int rc, res; int rc, res;
...@@ -13911,7 +13911,9 @@ static void test_bug12001() ...@@ -13911,7 +13911,9 @@ static void test_bug12001()
/* Create connection that supports multi statements */ /* Create connection that supports multi statements */
if (!mysql_real_connect(mysql_local, opt_host, opt_user, if (!mysql_real_connect(mysql_local, opt_host, opt_user,
opt_password, current_db, opt_port, opt_password, current_db, opt_port,
opt_unix_socket, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS)) { opt_unix_socket, CLIENT_MULTI_STATEMENTS |
CLIENT_MULTI_RESULTS))
{
fprintf(stdout, "\n mysql_real_connect() failed"); fprintf(stdout, "\n mysql_real_connect() failed");
exit(1); exit(1);
} }
...@@ -13919,12 +13921,16 @@ static void test_bug12001() ...@@ -13919,12 +13921,16 @@ static void test_bug12001()
rc= mysql_query(mysql_local, query); rc= mysql_query(mysql_local, query);
myquery(rc); myquery(rc);
do { do
if (mysql_field_count(mysql_local) && (result= mysql_use_result(mysql_local))) { {
mysql_free_result(result); if (mysql_field_count(mysql_local) &&
(result= mysql_use_result(mysql_local)))
{
mysql_free_result(result);
} }
} while (!(res= mysql_next_result(mysql_local))); }
while (!(res= mysql_next_result(mysql_local)));
rc= mysql_query(mysql_local, "DROP TABLE IF EXISTS test_table"); rc= mysql_query(mysql_local, "DROP TABLE IF EXISTS test_table");
myquery(rc); myquery(rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment