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
a79187b8
Commit
a79187b8
authored
Jul 30, 2010
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Plain Diff
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
parents
ddeee24b
93e81ccd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
12 deletions
+45
-12
mysql-test/r/mysql_client_test.result
mysql-test/r/mysql_client_test.result
+2
-0
mysql-test/t/mysql_client_test.test
mysql-test/t/mysql_client_test.test
+2
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+2
-2
tests/mysql_client_test.c
tests/mysql_client_test.c
+39
-10
No files found.
mysql-test/r/mysql_client_test.result
View file @
a79187b8
SET @old_general_log= @@global.general_log;
SET @old_slow_query_log= @@global.slow_query_log;
ok
# cat MYSQL_TMP_DIR/test_wl4435.out.log
...
...
@@ -120,3 +121,4 @@ mysql_stmt_next_result(): 0; field_count: 0
# ------------------------------------
SET @@global.general_log= @old_general_log;
SET @@global.slow_query_log= @old_slow_query_log;
mysql-test/t/mysql_client_test.test
View file @
a79187b8
...
...
@@ -2,6 +2,7 @@
--
source
include
/
not_embedded
.
inc
SET
@
old_general_log
=
@@
global
.
general_log
;
SET
@
old_slow_query_log
=
@@
global
.
slow_query_log
;
# We run with different binaries for normal and --embedded-server
#
...
...
@@ -24,3 +25,4 @@ echo ok;
--
echo
SET
@@
global
.
general_log
=
@
old_general_log
;
SET
@@
global
.
slow_query_log
=
@
old_slow_query_log
;
sql/sql_prepare.cc
View file @
a79187b8
...
...
@@ -882,7 +882,7 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array,
type (the types are supplied at execute). Check that the
supplied type of placeholder can accept a data stream.
*/
else
if
(
!
is_param_long_data_type
(
param
))
else
if
(
!
is_param_long_data_type
(
param
))
DBUG_RETURN
(
1
);
res
=
param
->
query_val_str
(
&
str
);
if
(
param
->
convert_str_value
(
thd
))
...
...
@@ -928,7 +928,7 @@ static bool insert_params(Prepared_statement *stmt, uchar *null_array,
type (the types are supplied at execute). Check that the
supplied type of placeholder can accept a data stream.
*/
else
if
(
is_param_long_data_type
(
param
))
else
if
(
!
is_param_long_data_type
(
param
))
DBUG_RETURN
(
1
);
if
(
param
->
convert_str_value
(
stmt
->
thd
))
DBUG_RETURN
(
1
);
/* out of memory */
...
...
tests/mysql_client_test.c
View file @
a79187b8
...
...
@@ -13831,37 +13831,52 @@ static void test_bug15518()
}
static
void
disable_
general_log
()
static
void
disable_
query_logs
()
{
int
rc
;
rc
=
mysql_query
(
mysql
,
"set @@global.general_log=off"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"set @@global.slow_query_log=off"
);
myquery
(
rc
);
}
static
void
enable_
general_log
(
int
truncate
)
static
void
enable_
query_logs
(
int
truncate
)
{
int
rc
;
rc
=
mysql_query
(
mysql
,
"set @save_global_general_log=@@global.general_log"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"set @save_global_slow_query_log=@@global.slow_query_log"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"set @@global.general_log=on"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"set @@global.slow_query_log=on"
);
myquery
(
rc
);
if
(
truncate
)
{
rc
=
mysql_query
(
mysql
,
"truncate mysql.general_log"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"truncate mysql.slow_log"
);
myquery
(
rc
);
}
}
static
void
restore_
general_log
()
static
void
restore_
query_logs
()
{
int
rc
;
rc
=
mysql_query
(
mysql
,
"set @@global.general_log=@save_global_general_log"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"set @@global.slow_query_log=@save_global_slow_query_log"
);
myquery
(
rc
);
}
...
...
@@ -16031,7 +16046,7 @@ static void test_bug17667()
return
;
}
enable_
general_log
(
1
);
enable_
query_logs
(
1
);
for
(
statement_cursor
=
statements
;
statement_cursor
->
buffer
!=
NULL
;
statement_cursor
++
)
...
...
@@ -16111,7 +16126,7 @@ static void test_bug17667()
statement_cursor
->
buffer
);
}
restore_
general_log
();
restore_
query_logs
();
if
(
!
opt_silent
)
printf
(
"success. All queries found intact in the log.
\n
"
);
...
...
@@ -17974,7 +17989,7 @@ static void test_bug28386()
}
mysql_free_result
(
result
);
enable_
general_log
(
1
);
enable_
query_logs
(
1
);
stmt
=
mysql_simple_prepare
(
mysql
,
"SELECT ?"
);
check_stmt
(
stmt
);
...
...
@@ -18013,7 +18028,7 @@ static void test_bug28386()
mysql_free_result
(
result
);
restore_
general_log
();
restore_
query_logs
();
DBUG_VOID_RETURN
;
}
...
...
@@ -19064,7 +19079,7 @@ static void test_bug42373()
Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run
*/
static
void
test_bug54041
()
static
void
test_bug54041
_impl
()
{
int
rc
;
MYSQL_STMT
*
stmt
;
...
...
@@ -19079,7 +19094,7 @@ static void test_bug54041()
rc
=
mysql_query
(
mysql
,
"CREATE TABLE t1 (a INT)"
);
myquery
(
rc
);
stmt
=
mysql_simple_prepare
(
mysql
,
"
INSERT INTO t1 (a) VALUES (?)
"
);
stmt
=
mysql_simple_prepare
(
mysql
,
"
SELECT a FROM t1 WHERE a > ?
"
);
check_stmt
(
stmt
);
verify_param_count
(
stmt
,
1
);
...
...
@@ -19117,6 +19132,20 @@ static void test_bug54041()
}
/**
Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run
*/
static
void
test_bug54041
()
{
enable_query_logs
(
0
);
test_bug54041_impl
();
disable_query_logs
();
test_bug54041_impl
();
restore_query_logs
();
}
/*
Bug#49972: Crash in prepared statements.
...
...
@@ -19306,7 +19335,7 @@ and you are welcome to modify and redistribute it under the GPL license\n");
static
struct
my_tests_st
my_tests
[]
=
{
{
"disable_
general_log"
,
disable_general_log
},
{
"disable_
query_logs"
,
disable_query_logs
},
{
"test_view_sp_list_fields"
,
test_view_sp_list_fields
},
{
"client_query"
,
client_query
},
{
"test_prepare_insert_update"
,
test_prepare_insert_update
},
...
...
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