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
3825f364
Commit
3825f364
authored
Sep 07, 2010
by
Martin Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge of fix for Bug#54543. Test case only (bug is not present in this tree).
parents
d439036a
3d5b9792
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
mysql-test/r/multi_update.result
mysql-test/r/multi_update.result
+20
-0
mysql-test/t/multi_update.test
mysql-test/t/multi_update.test
+21
-0
No files found.
mysql-test/r/multi_update.result
View file @
3825f364
...
...
@@ -649,4 +649,24 @@ SET SESSION sql_safe_updates = 1;
UPDATE IGNORE t1, t1 t1a SET t1.a = 1 WHERE t1a.a = 1;
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
DROP TABLE t1;
#
# Bug#54543: update ignore with incorrect subquery leads to assertion
# failure: inited==INDEX
#
SET SESSION sql_safe_updates = 0;
CREATE TABLE t1 ( a INT );
INSERT INTO t1 VALUES (1), (2);
CREATE TABLE t2 ( a INT );
INSERT INTO t2 VALUES (1), (2);
CREATE TABLE t3 ( a INT );
INSERT INTO t3 VALUES (1), (2);
# Should not crash
UPDATE IGNORE
( SELECT ( SELECT COUNT(*) FROM t1 GROUP BY a, @v ) a FROM t2 ) x, t3
SET t3.a = 0;
Warnings:
Error 1242 Subquery returns more than 1 row
Error 1242 Subquery returns more than 1 row
DROP TABLE t1, t2, t3;
SET SESSION sql_safe_updates = DEFAULT;
end of tests
mysql-test/t/multi_update.test
View file @
3825f364
...
...
@@ -650,5 +650,26 @@ SET SESSION sql_safe_updates = 1;
UPDATE
IGNORE
t1
,
t1
t1a
SET
t1
.
a
=
1
WHERE
t1a
.
a
=
1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#54543: update ignore with incorrect subquery leads to assertion
--
echo
# failure: inited==INDEX
--
echo
#
SET
SESSION
sql_safe_updates
=
0
;
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
);
CREATE
TABLE
t2
(
a
INT
);
INSERT
INTO
t2
VALUES
(
1
),
(
2
);
CREATE
TABLE
t3
(
a
INT
);
INSERT
INTO
t3
VALUES
(
1
),
(
2
);
--
echo
# Should not crash
UPDATE
IGNORE
(
SELECT
(
SELECT
COUNT
(
*
)
FROM
t1
GROUP
BY
a
,
@
v
)
a
FROM
t2
)
x
,
t3
SET
t3
.
a
=
0
;
DROP
TABLE
t1
,
t2
,
t3
;
SET
SESSION
sql_safe_updates
=
DEFAULT
;
--
echo
end
of
tests
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