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
9ae04e6d
Commit
9ae04e6d
authored
May 05, 2009
by
Bernt M. Johnsen
Browse files
Options
Browse Files
Download
Plain Diff
Bug#23471 prepared for commit in 5.1 gca branch
parents
52d3373e
2fd7330c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletion
+51
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+51
-1
No files found.
tests/mysql_client_test.c
View file @
9ae04e6d
...
@@ -2464,6 +2464,9 @@ static void test_ps_query_cache()
...
@@ -2464,6 +2464,9 @@ static void test_ps_query_cache()
myheader
(
"test_ps_query_cache"
);
myheader
(
"test_ps_query_cache"
);
rc
=
mysql_query
(
mysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
/* prepare the table */
/* prepare the table */
rc
=
mysql_query
(
mysql
,
"drop table if exists t1"
);
rc
=
mysql_query
(
mysql
,
"drop table if exists t1"
);
...
@@ -2506,6 +2509,9 @@ static void test_ps_query_cache()
...
@@ -2506,6 +2509,9 @@ static void test_ps_query_cache()
mysql_close
(
lmysql
);
mysql_close
(
lmysql
);
DIE_UNLESS
(
0
);
DIE_UNLESS
(
0
);
}
}
rc
=
mysql_query
(
lmysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
if
(
!
opt_silent
)
if
(
!
opt_silent
)
fprintf
(
stdout
,
"OK"
);
fprintf
(
stdout
,
"OK"
);
}
}
...
@@ -4240,6 +4246,10 @@ static void test_fetch_date()
...
@@ -4240,6 +4246,10 @@ static void test_fetch_date()
myheader
(
"test_fetch_date"
);
myheader
(
"test_fetch_date"
);
/* Will not work if sql_mode is NO_ZERO_DATE (implicit if TRADITIONAL) /*/
rc
=
mysql_query
(
mysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
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
);
...
@@ -4954,6 +4964,9 @@ static void test_stmt_close()
...
@@ -4954,6 +4964,9 @@ static void test_stmt_close()
/* set AUTOCOMMIT to ON*/
/* set AUTOCOMMIT to ON*/
mysql_autocommit
(
lmysql
,
TRUE
);
mysql_autocommit
(
lmysql
,
TRUE
);
rc
=
mysql_query
(
lmysql
,
"SET SQL_MODE = ''"
);
myquery
(
rc
);
rc
=
mysql_query
(
lmysql
,
"DROP TABLE IF EXISTS test_stmt_close"
);
rc
=
mysql_query
(
lmysql
,
"DROP TABLE IF EXISTS test_stmt_close"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -12088,6 +12101,9 @@ static void test_bug6058()
...
@@ -12088,6 +12101,9 @@ static void test_bug6058()
myheader
(
"test_bug6058"
);
myheader
(
"test_bug6058"
);
rc
=
mysql_query
(
mysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
stmt_text
=
"SELECT CAST('0000-00-00' AS DATE)"
;
stmt_text
=
"SELECT CAST('0000-00-00' AS DATE)"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
...
@@ -13303,6 +13319,9 @@ static void test_bug8378()
...
@@ -13303,6 +13319,9 @@ static void test_bug8378()
if
(
!
opt_silent
)
if
(
!
opt_silent
)
fprintf
(
stdout
,
"OK"
);
fprintf
(
stdout
,
"OK"
);
rc
=
mysql_query
(
lmysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
len
=
mysql_real_escape_string
(
lmysql
,
out
,
TEST_BUG8378_IN
,
4
);
len
=
mysql_real_escape_string
(
lmysql
,
out
,
TEST_BUG8378_IN
,
4
);
/* No escaping should have actually happened. */
/* No escaping should have actually happened. */
...
@@ -16389,6 +16408,14 @@ static void test_change_user()
...
@@ -16389,6 +16408,14 @@ static void test_change_user()
rc
=
mysql_query
(
mysql
,
buff
);
rc
=
mysql_query
(
mysql
,
buff
);
myquery
(
rc
);
myquery
(
rc
);
sprintf
(
buff
,
"grant select on %s.* to %s@'localhost' identified by '%s'"
,
db
,
user_pw
,
pw
);
rc
=
mysql_query
(
mysql
,
buff
);
myquery
(
rc
);
sprintf
(
buff
,
sprintf
(
buff
,
"grant select on %s.* to %s@'%%'"
,
"grant select on %s.* to %s@'%%'"
,
db
,
db
,
...
@@ -16396,6 +16423,13 @@ static void test_change_user()
...
@@ -16396,6 +16423,13 @@ static void test_change_user()
rc
=
mysql_query
(
mysql
,
buff
);
rc
=
mysql_query
(
mysql
,
buff
);
myquery
(
rc
);
myquery
(
rc
);
sprintf
(
buff
,
"grant select on %s.* to %s@'localhost'"
,
db
,
user_no_pw
);
rc
=
mysql_query
(
mysql
,
buff
);
myquery
(
rc
);
/* Try some combinations */
/* Try some combinations */
rc
=
mysql_change_user
(
mysql
,
NULL
,
NULL
,
NULL
);
rc
=
mysql_change_user
(
mysql
,
NULL
,
NULL
,
NULL
);
...
@@ -16552,6 +16586,14 @@ static void test_change_user()
...
@@ -16552,6 +16586,14 @@ static void test_change_user()
rc
=
mysql_query
(
mysql
,
buff
);
rc
=
mysql_query
(
mysql
,
buff
);
myquery
(
rc
);
myquery
(
rc
);
sprintf
(
buff
,
"drop user %s@'localhost'"
,
user_pw
);
rc
=
mysql_query
(
mysql
,
buff
);
myquery
(
rc
);
sprintf
(
buff
,
"drop user %s@'localhost'"
,
user_no_pw
);
rc
=
mysql_query
(
mysql
,
buff
);
myquery
(
rc
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
@@ -17220,6 +17262,11 @@ static void test_bug31669()
...
@@ -17220,6 +17262,11 @@ static void test_bug31669()
rc
=
mysql_query
(
mysql
,
query
);
rc
=
mysql_query
(
mysql
,
query
);
myquery
(
rc
);
myquery
(
rc
);
strxmov
(
query
,
"GRANT ALL PRIVILEGES ON *.* TO '"
,
user
,
"'@'localhost' IDENTIFIED BY "
"'"
,
buff
,
"' WITH GRANT OPTION"
,
NullS
);
rc
=
mysql_query
(
mysql
,
query
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"FLUSH PRIVILEGES"
);
rc
=
mysql_query
(
mysql
,
"FLUSH PRIVILEGES"
);
myquery
(
rc
);
myquery
(
rc
);
...
@@ -17257,7 +17304,7 @@ static void test_bug31669()
...
@@ -17257,7 +17304,7 @@ static void test_bug31669()
strxmov
(
query
,
"DELETE FROM mysql.user WHERE User='"
,
user
,
"'"
,
NullS
);
strxmov
(
query
,
"DELETE FROM mysql.user WHERE User='"
,
user
,
"'"
,
NullS
);
rc
=
mysql_query
(
mysql
,
query
);
rc
=
mysql_query
(
mysql
,
query
);
myquery
(
rc
);
myquery
(
rc
);
DIE_UNLESS
(
mysql_affected_rows
(
mysql
)
==
1
);
DIE_UNLESS
(
mysql_affected_rows
(
mysql
)
==
2
);
#endif
#endif
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
@@ -17469,6 +17516,9 @@ static void test_wl4166_2()
...
@@ -17469,6 +17516,9 @@ static void test_wl4166_2()
myheader
(
"test_wl4166_2"
);
myheader
(
"test_wl4166_2"
);
rc
=
mysql_query
(
mysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"drop table if exists t1"
);
rc
=
mysql_query
(
mysql
,
"drop table if exists t1"
);
myquery
(
rc
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"create table t1 (c_int int, d_date date)"
);
rc
=
mysql_query
(
mysql
,
"create table t1 (c_int int, d_date date)"
);
...
...
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