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
01c49e66
Commit
01c49e66
authored
Feb 02, 2017
by
Oleksandr Byelkin
Committed by
Sergei Golubchik
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-11966: Impossible to execute prepared ANALYZE SELECT
Prepare os ANALYZE now respond as EXPLAIN.
parent
32de60bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+20
-0
No files found.
sql/sql_prepare.cc
View file @
01c49e66
...
...
@@ -1527,7 +1527,7 @@ static int mysql_test_select(Prepared_statement *stmt,
*/
if
(
unit
->
prepare
(
thd
,
0
,
0
))
goto
error
;
if
(
!
lex
->
describe
&&
!
stmt
->
is_sql_prepare
())
if
(
!
lex
->
describe
&&
!
thd
->
lex
->
analyze_stmt
&&
!
stmt
->
is_sql_prepare
())
{
/* Make copy of item list, as change_columns may change it */
List
<
Item
>
fields
(
lex
->
select_lex
.
item_list
);
...
...
tests/mysql_client_test.c
View file @
01c49e66
...
...
@@ -19479,6 +19479,25 @@ static void test_big_packet()
}
/* Test simple prepares of all DML statements */
static
void
test_prepare_analyze
()
{
MYSQL_STMT
*
stmt
;
int
rc
;
myheader
(
"test_prepare_analyze"
);
stmt
=
mysql_stmt_init
(
mysql
);
check_stmt
(
stmt
);
rc
=
mysql_stmt_prepare
(
stmt
,
STRING_WITH_LEN
(
"ANALYZE SELECT 1"
));
check_execute
(
stmt
,
rc
);
verify_param_count
(
stmt
,
0
);
rc
=
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
mysql_stmt_close
(
stmt
);
}
static
struct
my_tests_st
my_tests
[]
=
{
{
"disable_query_logs"
,
disable_query_logs
},
{
"test_view_sp_list_fields"
,
test_view_sp_list_fields
},
...
...
@@ -19755,6 +19774,7 @@ static struct my_tests_st my_tests[]= {
#endif
{
"test_compressed_protocol"
,
test_compressed_protocol
},
{
"test_big_packet"
,
test_big_packet
},
{
"test_prepare_analyze"
,
test_prepare_analyze
},
{
0
,
0
}
};
...
...
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