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
e2e3524d
Commit
e2e3524d
authored
Sep 16, 2022
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another fix after the latest rebase of commits for MDEV-28883
parent
c22f7e8e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
mysql-test/main/derived.result
mysql-test/main/derived.result
+2
-4
sql/sql_base.cc
sql/sql_base.cc
+3
-3
sql/sql_delete.cc
sql/sql_delete.cc
+2
-0
sql/sql_update.cc
sql/sql_update.cc
+6
-1
No files found.
mysql-test/main/derived.result
View file @
e2e3524d
...
...
@@ -1593,8 +1593,7 @@ where a = ( select * from (select a from t1) dt where dt.a > 5)
returning pk, a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 SUBQUERY <derived3> ALL NULL NULL NULL NULL 3 Using where
3 DERIVED t1 ALL NULL NULL NULL NULL 3 Using where
2 SUBQUERY t1 ALL NULL NULL NULL NULL 3 Using where
delete from t1
where a = ( select * from (select a from t1) dt where dt.a > 5)
returning pk, a;
...
...
@@ -1633,8 +1632,7 @@ where a <> ( select * from (select a from t1) dt where dt.a > 7)
order by a limit 2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; Using filesort
2 SUBQUERY <derived3> ALL NULL NULL NULL NULL 4 Using where
3 DERIVED t1 ALL NULL NULL NULL NULL 4 Using where
2 SUBQUERY t1 ALL NULL NULL NULL NULL 4 Using where
delete from t1
where a <> ( select * from (select a from t1) dt where dt.a > 7)
order by a limit 2;
...
...
sql/sql_base.cc
View file @
e2e3524d
...
...
@@ -1205,7 +1205,7 @@ TABLE_LIST* find_dup_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
if
(
thd
->
lex
->
sql_command
==
SQLCOM_UPDATE
)
{
Sql_cmd_update
*
cmd
=
(
Sql_cmd_update
*
)
(
thd
->
lex
->
m_sql_cmd
);
if
(
cmd
->
is_multitable
())
if
(
cmd
->
is_multitable
()
||
derived
->
derived
->
outer_select
()
)
materialize
=
false
;
else
if
(
!
cmd
->
processing_as_multitable_update_prohibited
(
thd
))
{
...
...
@@ -1216,9 +1216,9 @@ TABLE_LIST* find_dup_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
else
if
(
thd
->
lex
->
sql_command
==
SQLCOM_DELETE
)
{
Sql_cmd_delete
*
cmd
=
(
Sql_cmd_delete
*
)
(
thd
->
lex
->
m_sql_cmd
);
if
(
cmd
->
is_multitable
())
if
(
cmd
->
is_multitable
()
||
derived
->
derived
->
outer_select
()
)
materialize
=
false
;
if
(
!
cmd
->
processing_as_multitable_delete_prohibited
(
thd
))
else
if
(
!
cmd
->
processing_as_multitable_delete_prohibited
(
thd
))
{
cmd
->
set_as_multitable
();
materialize
=
false
;
...
...
sql/sql_delete.cc
View file @
e2e3524d
...
...
@@ -1507,7 +1507,9 @@ bool Sql_cmd_delete::precheck(THD *thd)
return
true
;
}
#ifdef WITH_WSREP
WSREP_SYNC_WAIT
(
thd
,
WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE
);
#endif
return
false
;
...
...
sql/sql_update.cc
View file @
e2e3524d
...
...
@@ -2827,7 +2827,10 @@ bool multi_update::send_eof()
bool
Sql_cmd_update
::
processing_as_multitable_update_prohibited
(
THD
*
thd
)
{
return
false
;
SELECT_LEX
*
const
select_lex
=
thd
->
lex
->
first_select_lex
();
return
(
select_lex
->
order_list
.
elements
&&
select_lex
->
limit_params
.
select_limit
);
}
...
...
@@ -2851,7 +2854,9 @@ bool Sql_cmd_update::precheck(THD *thd)
return
true
;
}
#ifdef WITH_WSREP
WSREP_SYNC_WAIT
(
thd
,
WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE
);
#endif
return
false
;
...
...
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