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
b5ae1327
Commit
b5ae1327
authored
Feb 25, 2010
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of the fix for bug #49552 to 5.0-bugteam
parent
488a69b6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
mysql-test/r/delete.result
mysql-test/r/delete.result
+12
-0
mysql-test/t/delete.test
mysql-test/t/delete.test
+15
-0
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
No files found.
mysql-test/r/delete.result
View file @
b5ae1327
...
...
@@ -241,4 +241,16 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1
DROP TABLE t1;
DROP FUNCTION f1;
#
# Bug #49552 : sql_buffer_result cause crash + not found records
# in multitable delete/subquery
#
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (1),(2),(3);
SET SESSION SQL_BUFFER_RESULT=1;
DELETE t1 FROM (SELECT SUM(a) a FROM t1) x,t1;
SET SESSION SQL_BUFFER_RESULT=DEFAULT;
SELECT * FROM t1;
a
DROP TABLE t1;
End of 5.0 tests
mysql-test/t/delete.test
View file @
b5ae1327
...
...
@@ -247,4 +247,19 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
DROP
TABLE
t1
;
DROP
FUNCTION
f1
;
--
echo
#
--
echo
# Bug #49552 : sql_buffer_result cause crash + not found records
--
echo
# in multitable delete/subquery
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
);
SET
SESSION
SQL_BUFFER_RESULT
=
1
;
DELETE
t1
FROM
(
SELECT
SUM
(
a
)
a
FROM
t1
)
x
,
t1
;
SET
SESSION
SQL_BUFFER_RESULT
=
DEFAULT
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
sql/sql_parse.cc
View file @
b5ae1327
...
...
@@ -4009,9 +4009,9 @@ mysql_execute_command(THD *thd)
select_lex
->
where
,
0
,
(
ORDER
*
)
NULL
,
(
ORDER
*
)
NULL
,
(
Item
*
)
NULL
,
(
ORDER
*
)
NULL
,
select_lex
->
options
|
thd
->
options
|
(
select_lex
->
options
|
thd
->
options
|
SELECT_NO_JOIN_CACHE
|
SELECT_NO_UNLOCK
|
OPTION_SETUP_TABLES_DONE
,
OPTION_SETUP_TABLES_DONE
)
&
~
OPTION_BUFFER_RESULT
,
del_result
,
unit
,
select_lex
);
res
|=
thd
->
net
.
report_error
;
if
(
unlikely
(
res
))
...
...
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