From 51f1456d38191dad44df9d191c50efd159f6b6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sun, 19 Jun 2022 20:20:41 +0000 Subject: [PATCH] Fix to TAP test mysql-last_insert_id-t --- test/tap/tests/mysql-last_insert_id-t.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/tap/tests/mysql-last_insert_id-t.cpp b/test/tap/tests/mysql-last_insert_id-t.cpp index cae9d9de3..4d8acd3ac 100644 --- a/test/tap/tests/mysql-last_insert_id-t.cpp +++ b/test/tap/tests/mysql-last_insert_id-t.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) { if(cl.getEnv()) return exit_status(); - plan(4); + plan(8); MYSQL* mysql = mysql_init(NULL); if (!mysql) @@ -53,6 +53,7 @@ int main(int argc, char** argv) { diag("Waiting few seconds for replication..."); sleep(2); MYSQL_QUERY(mysql, "USE test"); + MYSQL_QUERY(mysql, "INSERT INTO sbtest1 (id) VALUES (NULL)"); MYSQL_RES *res; @@ -64,7 +65,7 @@ int main(int argc, char** argv) { unsigned long long num_rows = mysql_num_rows(res); ok(num_rows == 1, "mysql_num_rows() , expected: 1 , actual: %llu", num_rows); while ((row = mysql_fetch_row(res))) { - ok(strcmp(row[0],"500")==0, "row: expected: \"500\" , actual: \"%s\"", row[0]); + ok(strcmp(row[0],"501")==0, "row: expected: \"501\" , actual: \"%s\"", row[0]); } mysql_free_result(res); }