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
bc8ae50e
Commit
bc8ae50e
authored
Mar 07, 2019
by
Oleksandr Byelkin
Committed by
Sergei Golubchik
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix of prepared CREATE VIEW with global ORDER/GROUP
parent
83123412
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
sql/sql_union.cc
sql/sql_union.cc
+21
-10
No files found.
sql/sql_union.cc
View file @
bc8ae50e
...
...
@@ -661,16 +661,6 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
allocation in setup_ref_array().
*/
fake_select_lex
->
n_child_sum_items
+=
global_parameters
()
->
n_sum_items
;
saved_error
=
fake_select_lex
->
join
->
prepare
(
&
fake_select_lex
->
ref_pointer_array
,
fake_select_lex
->
table_list
.
first
,
0
,
0
,
global_parameters
()
->
order_list
.
elements
,
// og_num
global_parameters
()
->
order_list
.
first
,
// order
false
,
NULL
,
NULL
,
NULL
,
fake_select_lex
,
this
);
fake_select_lex
->
table_list
.
empty
();
}
}
else
...
...
@@ -681,6 +671,27 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
*/
table
->
reset_item_list
(
&
item_list
);
}
if
(
fake_select_lex
!=
NULL
&&
(
thd
->
stmt_arena
->
is_stmt_prepare
()
||
(
thd
->
lex
->
context_analysis_only
&
CONTEXT_ANALYSIS_ONLY_VIEW
)))
{
if
(
!
fake_select_lex
->
join
&&
!
(
fake_select_lex
->
join
=
new
JOIN
(
thd
,
item_list
,
thd
->
variables
.
option_bits
,
result
)))
{
fake_select_lex
->
table_list
.
empty
();
DBUG_RETURN
(
TRUE
);
}
saved_error
=
fake_select_lex
->
join
->
prepare
(
&
fake_select_lex
->
ref_pointer_array
,
fake_select_lex
->
table_list
.
first
,
0
,
0
,
global_parameters
()
->
order_list
.
elements
,
// og_num
global_parameters
()
->
order_list
.
first
,
// order
false
,
NULL
,
NULL
,
NULL
,
fake_select_lex
,
this
);
fake_select_lex
->
table_list
.
empty
();
}
}
thd_arg
->
lex
->
current_select
=
lex_select_save
;
...
...
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