Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
21783e85
Commit
21783e85
authored
Jun 05, 2004
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Few more cleanups in client_test:
No need for mysql_commit, especially after DDL statements.
parent
1ae0504c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
264 deletions
+13
-264
tests/client_test.c
tests/client_test.c
+13
-264
No files found.
tests/client_test.c
View file @
21783e85
...
@@ -784,17 +784,11 @@ static void test_tran_bdb()
...
@@ -784,17 +784,11 @@ static void test_tran_bdb()
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* create the table 'mytran_demo' of type BDB' or 'InnoDB' */
/* create the table 'mytran_demo' of type BDB' or 'InnoDB' */
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_demo_transaction( "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_demo_transaction( "
"col1 int , col2 varchar(30)) TYPE= BDB"
);
"col1 int , col2 varchar(30)) TYPE= BDB"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* insert a row and commit the transaction */
/* insert a row and commit the transaction */
rc
=
mysql_query
(
mysql
,
"INSERT INTO my_demo_transaction VALUES(10, 'venu')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO my_demo_transaction VALUES(10, 'venu')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -863,17 +857,11 @@ static void test_tran_innodb()
...
@@ -863,17 +857,11 @@ static void test_tran_innodb()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS my_demo_transaction"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS my_demo_transaction"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* create the table 'mytran_demo' of type BDB' or 'InnoDB' */
/* create the table 'mytran_demo' of type BDB' or 'InnoDB' */
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_demo_transaction(col1 int, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_demo_transaction(col1 int, "
"col2 varchar(30)) TYPE= InnoDB"
);
"col2 varchar(30)) TYPE= InnoDB"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* insert a row and commit the transaction */
/* insert a row and commit the transaction */
rc
=
mysql_query
(
mysql
,
"INSERT INTO my_demo_transaction VALUES(10, 'venu')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO my_demo_transaction VALUES(10, 'venu')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -937,9 +925,6 @@ static void test_prepare_simple()
...
@@ -937,9 +925,6 @@ static void test_prepare_simple()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_simple"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_simple"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_simple("
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_simple("
"id int, name varchar(50))"
);
"id int, name varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1008,9 +993,6 @@ static void test_prepare_field_result()
...
@@ -1008,9 +993,6 @@ static void test_prepare_field_result()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_field_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_field_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_field_result(int_c int, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_field_result(int_c int, "
"var_c varchar(50), ts_c timestamp(14), "
"var_c varchar(50), ts_c timestamp(14), "
"char_c char(3), date_c date, extra tinyint)"
);
"char_c char(3), date_c date, extra tinyint)"
);
...
@@ -1059,9 +1041,6 @@ static void test_prepare_syntax()
...
@@ -1059,9 +1041,6 @@ static void test_prepare_syntax()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_syntax"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_syntax"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_syntax("
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_syntax("
"id int, name varchar(50), extra int)"
);
"id int, name varchar(50), extra int)"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1105,9 +1084,6 @@ static void test_prepare()
...
@@ -1105,9 +1084,6 @@ static void test_prepare()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS my_prepare"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS my_prepare"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_prepare(col1 tinyint, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_prepare(col1 tinyint, "
"col2 varchar(15), col3 int, "
"col2 varchar(15), col3 int, "
"col4 smallint, col5 bigint, "
"col4 smallint, col5 bigint, "
...
@@ -1277,9 +1253,6 @@ static void test_double_compare()
...
@@ -1277,9 +1253,6 @@ static void test_double_compare()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_double_compare"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_double_compare"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_double_compare(col1 tinyint, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_double_compare(col1 tinyint, "
" col2 float, col3 double )"
);
" col2 float, col3 double )"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1358,9 +1331,6 @@ static void test_null()
...
@@ -1358,9 +1331,6 @@ static void test_null()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_null"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_null"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_null(col1 int, col2 varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_null(col1 int, col2 varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1537,9 +1507,6 @@ static void test_fetch_null()
...
@@ -1537,9 +1507,6 @@ static void test_fetch_null()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_fetch_null"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_fetch_null"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_fetch_null("
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_fetch_null("
" col1 tinyint, col2 smallint, "
" col1 tinyint, col2 smallint, "
" col3 int, col4 bigint, "
" col3 int, col4 bigint, "
...
@@ -1550,9 +1517,6 @@ static void test_fetch_null()
...
@@ -1550,9 +1517,6 @@ static void test_fetch_null()
" col11 char(20))"
);
" col11 char(20))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_fetch_null (col11) "
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_fetch_null (col11) "
"VALUES (1000), (88), (389789)"
);
"VALUES (1000), (88), (389789)"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1664,18 +1628,12 @@ static void test_select_direct()
...
@@ -1664,18 +1628,12 @@ static void test_select_direct()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_select"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_select"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id int, id1 tinyint, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id int, id1 tinyint, "
" id2 float, "
" id2 float, "
" id3 double, "
" id3 double, "
" name varchar(50))"
);
" name varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* insert a row and commit the transaction */
/* insert a row and commit the transaction */
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(10, 5, 2.3, 4.5, 'venu')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(10, 5, 2.3, 4.5, 'venu')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1710,15 +1668,9 @@ static void test_select_prepare()
...
@@ -1710,15 +1668,9 @@ static void test_select_prepare()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_select"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_select"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id int, name varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id int, name varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* insert a row and commit the transaction */
/* insert a row and commit the transaction */
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(10, 'venu')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(10, 'venu')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1738,17 +1690,11 @@ static void test_select_prepare()
...
@@ -1738,17 +1690,11 @@ static void test_select_prepare()
rc
=
mysql_query
(
mysql
,
"DROP TABLE test_select"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE test_select"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id tinyint, id1 int, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id tinyint, id1 int, "
" id2 float, id3 float, "
" id2 float, id3 float, "
" name varchar(50))"
);
" name varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* insert a row and commit the transaction */
/* insert a row and commit the transaction */
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select(id, id1, id2, name) VALUES(10, 5, 2.3, 'venu')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select(id, id1, id2, name) VALUES(10, 5, 2.3, 'venu')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -1786,22 +1732,13 @@ static void test_select()
...
@@ -1786,22 +1732,13 @@ static void test_select()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_select"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_select"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id int, name varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_select(id int, name varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* insert a row and commit the transaction */
/* insert a row and commit the transaction */
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(10, 'venu')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(10, 'venu')"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* now insert the second row, and rollback the transaction */
/* now insert the second row, and rollback the transaction */
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(20, 'mysql')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_select VALUES(20, 'mysql')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -2276,16 +2213,10 @@ static void test_simple_update()
...
@@ -2276,16 +2213,10 @@ static void test_simple_update()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_update"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_update"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_update(col1 int, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_update(col1 int, "
" col2 varchar(50), col3 int )"
);
" col2 varchar(50), col3 int )"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_update VALUES(1, 'MySQL', 100)"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_update VALUES(1, 'MySQL', 100)"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -2358,16 +2289,10 @@ static void test_long_data()
...
@@ -2358,16 +2289,10 @@ static void test_long_data()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data(col1 int, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data(col1 int, "
" col2 long varchar, col3 long varbinary)"
);
" col2 long varchar, col3 long varbinary)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
strmov
(
query
,
"INSERT INTO test_long_data(col1, col2) VALUES(?)"
);
strmov
(
query
,
"INSERT INTO test_long_data(col1, col2) VALUES(?)"
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
check_stmt_r
(
stmt
);
check_stmt_r
(
stmt
);
...
@@ -2448,15 +2373,9 @@ static void test_long_data_str()
...
@@ -2448,15 +2373,9 @@ static void test_long_data_str()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data_str"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data_str"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data_str(id int, longstr long varchar)"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data_str(id int, longstr long varchar)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
strmov
(
query
,
"INSERT INTO test_long_data_str VALUES(?, ?)"
);
strmov
(
query
,
"INSERT INTO test_long_data_str VALUES(?, ?)"
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
check_stmt
(
stmt
);
check_stmt
(
stmt
);
...
@@ -2544,15 +2463,9 @@ static void test_long_data_str1()
...
@@ -2544,15 +2463,9 @@ static void test_long_data_str1()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data_str"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data_str"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data_str(longstr long varchar, blb long varbinary)"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data_str(longstr long varchar, blb long varbinary)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
strmov
(
query
,
"INSERT INTO test_long_data_str VALUES(?, ?)"
);
strmov
(
query
,
"INSERT INTO test_long_data_str VALUES(?, ?)"
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
check_stmt
(
stmt
);
check_stmt
(
stmt
);
...
@@ -2701,15 +2614,9 @@ static void test_long_data_bin()
...
@@ -2701,15 +2614,9 @@ static void test_long_data_bin()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data_bin"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_long_data_bin"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data_bin(id int, longbin long varbinary)"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_long_data_bin(id int, longbin long varbinary)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
strmov
(
query
,
"INSERT INTO test_long_data_bin VALUES(?, ?)"
);
strmov
(
query
,
"INSERT INTO test_long_data_bin VALUES(?, ?)"
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
check_stmt
(
stmt
);
check_stmt
(
stmt
);
...
@@ -2783,16 +2690,10 @@ static void test_simple_delete()
...
@@ -2783,16 +2690,10 @@ static void test_simple_delete()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_simple_delete"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_simple_delete"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_simple_delete(col1 int, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_simple_delete(col1 int, \
col2 varchar(50), col3 int )"
);
col2 varchar(50), col3 int )"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_simple_delete VALUES(1, 'MySQL', 100)"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_simple_delete VALUES(1, 'MySQL', 100)"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -2869,14 +2770,9 @@ static void test_update()
...
@@ -2869,14 +2770,9 @@ static void test_update()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_update"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_update"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_update("
myquery
(
rc
);
"col1 int primary key auto_increment, "
"col2 varchar(50), col3 int )"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_update(col1 int primary key auto_increment, \
col2 varchar(50), col3 int )"
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
myquery
(
rc
);
strmov
(
query
,
"INSERT INTO test_update(col2, col3) VALUES(?, ?)"
);
strmov
(
query
,
"INSERT INTO test_update(col2, col3) VALUES(?, ?)"
);
...
@@ -2966,13 +2862,10 @@ static void test_prepare_noparam()
...
@@ -2966,13 +2862,10 @@ static void test_prepare_noparam()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS my_prepare"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS my_prepare"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_prepare(col1 int
, col2 varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE my_prepare(col1 int, col2 varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
/* insert by prepare */
/* insert by prepare */
strmov
(
query
,
"INSERT INTO my_prepare VALUES(10, 'venu')"
);
strmov
(
query
,
"INSERT INTO my_prepare VALUES(10, 'venu')"
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
stmt
=
mysql_simple_prepare
(
mysql
,
query
);
...
@@ -3019,15 +2912,9 @@ static void test_bind_result()
...
@@ -3019,15 +2912,9 @@ static void test_bind_result()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(col1 int , col2 varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(col1 int , col2 varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result VALUES(10, 'venu')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result VALUES(10, 'venu')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -3118,22 +3005,17 @@ static void test_bind_result_ext()
...
@@ -3118,22 +3005,17 @@ static void test_bind_result_ext()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(c1 tinyint, "
myquery
(
rc
);
" c2 smallint, "
" c3 int, c4 bigint, "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(c1 tinyint, c2 smallint, \
" c5 float, c6 double, "
c3 int, c4 bigint, \
" c7 varbinary(10), "
c5 float, c6 double, \
" c8 varchar(50))"
);
c7 varbinary(10), \
c8 varchar(50))"
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result
VALUES(19, 2999, 3999, 4999999, \
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result
"
2345.6, 5678.89563, \
"VALUES (19, 2999, 3999, 4999999, "
'venu', 'mysql')"
);
" 2345.6, 5678.89563,
'venu', 'mysql')"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
rc
=
mysql_commit
(
mysql
);
...
@@ -3240,9 +3122,6 @@ static void test_bind_result_ext1()
...
@@ -3240,9 +3122,6 @@ static void test_bind_result_ext1()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(c1 tinyint, c2 smallint, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(c1 tinyint, c2 smallint, \
c3 int, c4 bigint, \
c3 int, c4 bigint, \
c5 float, c6 double, \
c5 float, c6 double, \
...
@@ -3250,9 +3129,6 @@ static void test_bind_result_ext1()
...
@@ -3250,9 +3129,6 @@ static void test_bind_result_ext1()
c8 varchar(10))"
);
c8 varchar(10))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result VALUES(120, 2999, 3999, 54, \
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result VALUES(120, 2999, 3999, 54, \
2.6, 58.89, \
2.6, 58.89, \
'206', '6.7')"
);
'206', '6.7')"
);
...
@@ -3499,9 +3375,6 @@ static void test_fetch_date()
...
@@ -3499,9 +3375,6 @@ static void test_fetch_date()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(c1 date, c2 time, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_result(c1 date, c2 time, \
c3 timestamp(14), \
c3 timestamp(14), \
c4 year, \
c4 year, \
...
@@ -3510,9 +3383,6 @@ static void test_fetch_date()
...
@@ -3510,9 +3383,6 @@ static void test_fetch_date()
c7 timestamp(6))"
);
c7 timestamp(6))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result VALUES('2002-01-02', \
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_bind_result VALUES('2002-01-02', \
'12:49:00', \
'12:49:00', \
'2002-01-02 17:46:59', \
'2002-01-02 17:46:59', \
...
@@ -3626,9 +3496,6 @@ static void test_fetch_str()
...
@@ -3626,9 +3496,6 @@ static void test_fetch_str()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 char(10), \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 char(10), \
c2 char(10), \
c2 char(10), \
c3 char(20), \
c3 char(20), \
...
@@ -3638,9 +3505,6 @@ static void test_fetch_str()
...
@@ -3638,9 +3505,6 @@ static void test_fetch_str()
c7 char(20))"
);
c7 char(20))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
bind_fetch
(
3
);
bind_fetch
(
3
);
}
}
...
@@ -3656,9 +3520,6 @@ static void test_fetch_long()
...
@@ -3656,9 +3520,6 @@ static void test_fetch_long()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 int unsigned, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 int unsigned, \
c2 int unsigned, \
c2 int unsigned, \
c3 int, \
c3 int, \
...
@@ -3668,9 +3529,6 @@ static void test_fetch_long()
...
@@ -3668,9 +3529,6 @@ static void test_fetch_long()
c7 int)"
);
c7 int)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
bind_fetch
(
4
);
bind_fetch
(
4
);
}
}
...
@@ -3686,9 +3544,6 @@ static void test_fetch_short()
...
@@ -3686,9 +3544,6 @@ static void test_fetch_short()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 smallint unsigned, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 smallint unsigned, \
c2 smallint, \
c2 smallint, \
c3 smallint unsigned, \
c3 smallint unsigned, \
...
@@ -3698,9 +3553,6 @@ static void test_fetch_short()
...
@@ -3698,9 +3553,6 @@ static void test_fetch_short()
c7 smallint unsigned)"
);
c7 smallint unsigned)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
bind_fetch
(
5
);
bind_fetch
(
5
);
}
}
...
@@ -3716,9 +3568,6 @@ static void test_fetch_tiny()
...
@@ -3716,9 +3568,6 @@ static void test_fetch_tiny()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 tinyint unsigned, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 tinyint unsigned, \
c2 tinyint, \
c2 tinyint, \
c3 tinyint unsigned, \
c3 tinyint unsigned, \
...
@@ -3728,9 +3577,6 @@ static void test_fetch_tiny()
...
@@ -3728,9 +3577,6 @@ static void test_fetch_tiny()
c7 tinyint unsigned)"
);
c7 tinyint unsigned)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
bind_fetch
(
3
);
bind_fetch
(
3
);
}
}
...
@@ -3747,9 +3593,6 @@ static void test_fetch_bigint()
...
@@ -3747,9 +3593,6 @@ static void test_fetch_bigint()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 bigint, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 bigint, \
c2 bigint, \
c2 bigint, \
c3 bigint unsigned, \
c3 bigint unsigned, \
...
@@ -3759,9 +3602,6 @@ static void test_fetch_bigint()
...
@@ -3759,9 +3602,6 @@ static void test_fetch_bigint()
c7 bigint unsigned)"
);
c7 bigint unsigned)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
bind_fetch
(
2
);
bind_fetch
(
2
);
}
}
...
@@ -3778,9 +3618,6 @@ static void test_fetch_float()
...
@@ -3778,9 +3618,6 @@ static void test_fetch_float()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 float(3), \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 float(3), \
c2 float, \
c2 float, \
c3 float unsigned, \
c3 float unsigned, \
...
@@ -3790,9 +3627,6 @@ static void test_fetch_float()
...
@@ -3790,9 +3627,6 @@ static void test_fetch_float()
c7 float(10) unsigned)"
);
c7 float(10) unsigned)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
bind_fetch
(
2
);
bind_fetch
(
2
);
}
}
...
@@ -3809,18 +3643,12 @@ static void test_fetch_double()
...
@@ -3809,18 +3643,12 @@ static void test_fetch_double()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_fetch"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 double(5, 2), "
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_bind_fetch(c1 double(5, 2), "
"c2 double unsigned, c3 double unsigned, "
"c2 double unsigned, c3 double unsigned, "
"c4 double unsigned, c5 double unsigned, "
"c4 double unsigned, c5 double unsigned, "
"c6 double unsigned, c7 double unsigned)"
);
"c6 double unsigned, c7 double unsigned)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
bind_fetch
(
3
);
bind_fetch
(
3
);
}
}
...
@@ -3843,9 +3671,6 @@ static void test_prepare_ext()
...
@@ -3843,9 +3671,6 @@ static void test_prepare_ext()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_ext"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_ext"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
sql
=
(
char
*
)
"CREATE TABLE test_prepare_ext\
sql
=
(
char
*
)
"CREATE TABLE test_prepare_ext\
(\
(\
c1 tinyint, \
c1 tinyint, \
...
@@ -3963,18 +3788,12 @@ static void test_field_names()
...
@@ -3963,18 +3788,12 @@ static void test_field_names()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_field_names2"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_field_names2"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_field_names1(id int, name varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_field_names1(id int, name varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_field_names2(id int, name varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_field_names2(id int, name varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* with table name included with TRUE column name */
/* with table name included with TRUE column name */
rc
=
mysql_query
(
mysql
,
"SELECT id as 'id-alias' FROM test_field_names1"
);
rc
=
mysql_query
(
mysql
,
"SELECT id as 'id-alias' FROM test_field_names1"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -4068,9 +3887,6 @@ static void test_insert()
...
@@ -4068,9 +3887,6 @@ static void test_insert()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_insert"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_insert"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_insert(col1 tinyint, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_insert(col1 tinyint, \
col2 varchar(50))"
);
col2 varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -4145,9 +3961,6 @@ static void test_prepare_resultset()
...
@@ -4145,9 +3961,6 @@ static void test_prepare_resultset()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_resultset"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prepare_resultset"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_resultset(id int, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prepare_resultset(id int, \
name varchar(50), extra double)"
);
name varchar(50), extra double)"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -4180,9 +3993,6 @@ static void test_field_flags()
...
@@ -4180,9 +3993,6 @@ static void test_field_flags()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_field_flags"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_field_flags"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_field_flags(id int NOT NULL AUTO_INCREMENT PRIMARY KEY, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_field_flags(id int NOT NULL AUTO_INCREMENT PRIMARY KEY, \
id1 int NOT NULL, \
id1 int NOT NULL, \
id2 int UNIQUE, \
id2 int UNIQUE, \
...
@@ -4192,9 +4002,6 @@ static void test_field_flags()
...
@@ -4192,9 +4002,6 @@ static void test_field_flags()
KEY(id3, id4))"
);
KEY(id3, id4))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
/* with table name included with TRUE column name */
/* with table name included with TRUE column name */
rc
=
mysql_query
(
mysql
,
"SELECT * FROM test_field_flags"
);
rc
=
mysql_query
(
mysql
,
"SELECT * FROM test_field_flags"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -4456,9 +4263,6 @@ static void test_insert_meta()
...
@@ -4456,9 +4263,6 @@ static void test_insert_meta()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_insert"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_insert"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_insert(col1 tinyint, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_insert(col1 tinyint, \
col2 varchar(50), col3 varchar(30))"
);
col2 varchar(50), col3 varchar(30))"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -4521,9 +4325,6 @@ static void test_update_meta()
...
@@ -4521,9 +4325,6 @@ static void test_update_meta()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_update"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_update"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_update(col1 tinyint, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_update(col1 tinyint, \
col2 varchar(50), col3 varchar(30))"
);
col2 varchar(50), col3 varchar(30))"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -4590,9 +4391,6 @@ static void test_select_meta()
...
@@ -4590,9 +4391,6 @@ static void test_select_meta()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_select"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_prep_select"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_select(col1 tinyint, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_prep_select(col1 tinyint, \
col2 varchar(50), col3 varchar(30))"
);
col2 varchar(50), col3 varchar(30))"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -4657,9 +4455,6 @@ static void test_func_fields()
...
@@ -4657,9 +4455,6 @@ static void test_func_fields()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_dateformat"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_dateformat"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_dateformat(id int, \
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_dateformat(id int, \
ts timestamp)"
);
ts timestamp)"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -5235,15 +5030,9 @@ static void test_store_result()
...
@@ -5235,15 +5030,9 @@ static void test_store_result()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_store_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_store_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_store_result(col1 int , col2 varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_store_result(col1 int , col2 varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_store_result VALUES(10, 'venu'), (20, 'mysql')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_store_result VALUES(10, 'venu'), (20, 'mysql')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -5359,15 +5148,9 @@ static void test_store_result1()
...
@@ -5359,15 +5148,9 @@ static void test_store_result1()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_store_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_store_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_store_result(col1 int , col2 varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_store_result(col1 int , col2 varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_store_result VALUES(10, 'venu'), (20, 'mysql')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_store_result VALUES(10, 'venu'), (20, 'mysql')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -5423,15 +5206,9 @@ static void test_store_result2()
...
@@ -5423,15 +5206,9 @@ static void test_store_result2()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_store_result"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_store_result"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_store_result(col1 int , col2 varchar(50))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_store_result(col1 int , col2 varchar(50))"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_store_result VALUES(10, 'venu'), (20, 'mysql')"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_store_result VALUES(10, 'venu'), (20, 'mysql')"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -5516,18 +5293,12 @@ static void test_subselect()
...
@@ -5516,18 +5293,12 @@ static void test_subselect()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_sub2"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_sub2"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_sub1(id int)"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_sub1(id int)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_sub2(id int, id1 int)"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_sub2(id int, id1 int)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_sub1 values(2)"
);
rc
=
mysql_query
(
mysql
,
"INSERT INTO test_sub1 values(2)"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -5771,9 +5542,6 @@ static void test_date()
...
@@ -5771,9 +5542,6 @@ static void test_date()
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
test_bind_date_conv
(
5
);
test_bind_date_conv
(
5
);
}
}
...
@@ -5796,9 +5564,6 @@ static void test_date_date()
...
@@ -5796,9 +5564,6 @@ static void test_date_date()
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
test_bind_date_conv
(
3
);
test_bind_date_conv
(
3
);
}
}
...
@@ -5821,9 +5586,6 @@ static void test_date_time()
...
@@ -5821,9 +5586,6 @@ static void test_date_time()
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
test_bind_date_conv
(
3
);
test_bind_date_conv
(
3
);
}
}
...
@@ -5846,9 +5608,6 @@ static void test_date_ts()
...
@@ -5846,9 +5608,6 @@ static void test_date_ts()
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
test_bind_date_conv
(
2
);
test_bind_date_conv
(
2
);
}
}
...
@@ -5868,9 +5627,6 @@ static void test_date_dt()
...
@@ -5868,9 +5627,6 @@ static void test_date_dt()
" c2 datetime, c3 datetime, c4 date)"
);
" c2 datetime, c3 datetime, c4 date)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
test_bind_date_conv
(
2
);
test_bind_date_conv
(
2
);
}
}
...
@@ -5955,7 +5711,6 @@ static void test_pure_coverage()
...
@@ -5955,7 +5711,6 @@ static void test_pure_coverage()
mysql_stmt_close
(
stmt
);
mysql_stmt_close
(
stmt
);
mysql_query
(
mysql
,
"DROP TABLE test_pure"
);
mysql_query
(
mysql
,
"DROP TABLE test_pure"
);
mysql_commit
(
mysql
);
}
}
...
@@ -8046,9 +7801,6 @@ static void test_sqlmode()
...
@@ -8046,9 +7801,6 @@ static void test_sqlmode()
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_piping"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_piping"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_piping(name varchar(10))"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_piping(name varchar(10))"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -8183,9 +7935,6 @@ static void test_ts()
...
@@ -8183,9 +7935,6 @@ static void test_ts()
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_ts(a DATE, b TIME, c TIMESTAMP)"
);
rc
=
mysql_query
(
mysql
,
"CREATE TABLE test_ts(a DATE, b TIME, c TIMESTAMP)"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_commit
(
mysql
);
myquery
(
rc
);
stmt
=
mysql_simple_prepare
(
mysql
,
"INSERT INTO test_ts VALUES(?, ?, ?), (?, ?, ?)"
);
stmt
=
mysql_simple_prepare
(
mysql
,
"INSERT INTO test_ts VALUES(?, ?, ?), (?, ?, ?)"
);
check_stmt
(
stmt
);
check_stmt
(
stmt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment