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
34f9ead0
Commit
34f9ead0
authored
Feb 26, 2008
by
kostja@dipika.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge dipika.(none):/opt/local/work/mysql-5.0-runtime
into dipika.(none):/opt/local/work/mysql-5.1-runtime
parents
461de0f3
74addb78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
33 deletions
+32
-33
tests/mysql_client_test.c
tests/mysql_client_test.c
+32
-33
No files found.
tests/mysql_client_test.c
View file @
34f9ead0
...
...
@@ -8973,8 +8973,8 @@ static void test_sqlmode()
strmov
(
c1
,
"My"
);
strmov
(
c2
,
"SQL"
);
rc
=
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
mysql_stmt_close
(
stmt
);
verify_col_data
(
"test_piping"
,
"name"
,
"MySQL"
);
rc
=
mysql_query
(
mysql
,
"DELETE FROM test_piping"
);
...
...
@@ -13282,7 +13282,7 @@ from t2);");
static
void
test_bug8378
()
{
#if defined(HAVE_CHARSET_gbk) && !defined(EMBEDDED_LIBRARY)
MYSQL
*
old_mysql
=
mysql
;
MYSQL
*
l
mysql
;
char
out
[
9
];
/* strlen(TEST_BUG8378)*2+1 */
char
buf
[
256
];
int
len
,
rc
;
...
...
@@ -13291,17 +13291,17 @@ static void test_bug8378()
if
(
!
opt_silent
)
fprintf
(
stdout
,
"
\n
Establishing a test connection ..."
);
if
(
!
(
mysql
=
mysql_init
(
NULL
)))
if
(
!
(
l
mysql
=
mysql_init
(
NULL
)))
{
myerror
(
"mysql_init() failed"
);
exit
(
1
);
}
if
(
mysql_options
(
mysql
,
MYSQL_SET_CHARSET_NAME
,
"gbk"
))
if
(
mysql_options
(
l
mysql
,
MYSQL_SET_CHARSET_NAME
,
"gbk"
))
{
myerror
(
"mysql_options() failed"
);
exit
(
1
);
}
if
(
!
(
mysql_real_connect
(
mysql
,
opt_host
,
opt_user
,
if
(
!
(
mysql_real_connect
(
l
mysql
,
opt_host
,
opt_user
,
opt_password
,
current_db
,
opt_port
,
opt_unix_socket
,
0
)))
{
...
...
@@ -13311,19 +13311,17 @@ static void test_bug8378()
if
(
!
opt_silent
)
fprintf
(
stdout
,
"OK"
);
len
=
mysql_real_escape_string
(
mysql
,
out
,
TEST_BUG8378_IN
,
4
);
len
=
mysql_real_escape_string
(
l
mysql
,
out
,
TEST_BUG8378_IN
,
4
);
/* No escaping should have actually happened. */
DIE_UNLESS
(
memcmp
(
out
,
TEST_BUG8378_OUT
,
len
)
==
0
);
sprintf
(
buf
,
"SELECT '%s'"
,
out
);
rc
=
mysql_real_query
(
mysql
,
buf
,
strlen
(
buf
));
rc
=
mysql_real_query
(
l
mysql
,
buf
,
strlen
(
buf
));
myquery
(
rc
);
mysql_close
(
mysql
);
mysql
=
old_mysql
;
mysql_close
(
lmysql
);
#endif
}
...
...
@@ -15160,7 +15158,7 @@ static void test_opt_reconnect()
if
(
mysql_options
(
lmysql
,
MYSQL_OPT_RECONNECT
,
&
my_true
))
{
myerror
(
"mysql_options failed: unknown option MYSQL_OPT_RECONNECT
\n
"
);
exit
(
1
);
DIE_UNLESS
(
0
);
}
/* reconnect should be 1 */
...
...
@@ -15173,7 +15171,7 @@ static void test_opt_reconnect()
opt_unix_socket
,
0
)))
{
myerror
(
"connection failed"
);
exit
(
1
);
DIE_UNLESS
(
0
);
}
/* reconnect should still be 1 */
...
...
@@ -15187,7 +15185,7 @@ static void test_opt_reconnect()
if
(
!
(
lmysql
=
mysql_init
(
NULL
)))
{
myerror
(
"mysql_init() failed"
);
exit
(
1
);
DIE_UNLESS
(
0
);
}
if
(
!
opt_silent
)
...
...
@@ -15199,7 +15197,7 @@ static void test_opt_reconnect()
opt_unix_socket
,
0
)))
{
myerror
(
"connection failed"
);
exit
(
1
);
DIE_UNLESS
(
0
);
}
/* reconnect should still be 0 */
...
...
@@ -15217,32 +15215,32 @@ static void test_opt_reconnect()
static
void
test_bug12744
()
{
MYSQL_STMT
*
prep_stmt
=
NULL
;
MYSQL
*
lmysql
;
int
rc
;
myheader
(
"test_bug12744"
);
prep_stmt
=
mysql_stmt_init
(
mysql
);
rc
=
mysql_stmt_prepare
(
prep_stmt
,
"SELECT 1"
,
8
);
DIE_UNLESS
(
rc
==
0
);
lmysql
=
mysql_init
(
NULL
);
DIE_UNLESS
(
lmysql
);
mysql_close
(
mysql
);
if
((
rc
=
mysql_stmt_execute
(
prep_stmt
)))
{
if
((
rc
=
mysql_stmt_reset
(
prep_stmt
)))
printf
(
"OK!
\n
"
);
else
{
printf
(
"Error!"
);
DIE_UNLESS
(
1
==
0
);
}
}
else
if
(
!
mysql_real_connect
(
lmysql
,
opt_host
,
opt_user
,
opt_password
,
current_db
,
opt_port
,
opt_unix_socket
,
0
))
{
fprintf
(
stderr
,
"
expected error but no error occured
\n
"
);
DIE_UNLESS
(
1
==
0
);
fprintf
(
stderr
,
"
Failed to connect to the database
\n
"
);
DIE_UNLESS
(
0
);
}
prep_stmt
=
mysql_stmt_init
(
lmysql
);
rc
=
mysql_stmt_prepare
(
prep_stmt
,
"SELECT 1"
,
8
);
DIE_UNLESS
(
rc
==
0
);
mysql_close
(
lmysql
);
rc
=
mysql_stmt_execute
(
prep_stmt
);
DIE_UNLESS
(
rc
);
rc
=
mysql_stmt_reset
(
prep_stmt
);
DIE_UNLESS
(
rc
);
rc
=
mysql_stmt_close
(
prep_stmt
);
client_connect
(
0
);
DIE_UNLESS
(
rc
==
0
);
}
#endif
/* EMBEDDED_LIBRARY */
...
...
@@ -16106,6 +16104,7 @@ static void test_bug24179()
mysql_stmt_error
(
stmt
));
}
DIE_UNLESS
(
mysql_stmt_errno
(
stmt
)
==
1323
);
mysql_stmt_close
(
stmt
);
DBUG_VOID_RETURN
;
}
...
...
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