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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
Hide 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;
...
@@ -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
ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1
DROP TABLE t1;
DROP TABLE t1;
DROP FUNCTION f1;
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
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;
...
@@ -247,4 +247,19 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
DROP
FUNCTION
f1
;
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
--
echo
End
of
5.0
tests
sql/sql_parse.cc
View file @
b5ae1327
...
@@ -4009,9 +4009,9 @@ end_with_restore_list:
...
@@ -4009,9 +4009,9 @@ end_with_restore_list:
select_lex
->
where
,
select_lex
->
where
,
0
,
(
ORDER
*
)
NULL
,
(
ORDER
*
)
NULL
,
(
Item
*
)
NULL
,
0
,
(
ORDER
*
)
NULL
,
(
ORDER
*
)
NULL
,
(
Item
*
)
NULL
,
(
ORDER
*
)
NULL
,
(
ORDER
*
)
NULL
,
select_lex
->
options
|
thd
->
options
|
(
select_lex
->
options
|
thd
->
options
|
SELECT_NO_JOIN_CACHE
|
SELECT_NO_UNLOCK
|
SELECT_NO_JOIN_CACHE
|
SELECT_NO_UNLOCK
|
OPTION_SETUP_TABLES_DONE
,
OPTION_SETUP_TABLES_DONE
)
&
~
OPTION_BUFFER_RESULT
,
del_result
,
unit
,
select_lex
);
del_result
,
unit
,
select_lex
);
res
|=
thd
->
net
.
report_error
;
res
|=
thd
->
net
.
report_error
;
if
(
unlikely
(
res
))
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