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
56045ef9
Commit
56045ef9
authored
Jun 10, 2020
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for crash in Aria LOCK TABLES + CREATE TRIGGER
MDEV-22829 SIGSEGV in _ma_reset_history on LOCK
parent
ab7eedc1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
mysql-test/suite/maria/lock.result
mysql-test/suite/maria/lock.result
+11
-0
mysql-test/suite/maria/lock.test
mysql-test/suite/maria/lock.test
+13
-0
sql/sql_trigger.cc
sql/sql_trigger.cc
+5
-1
No files found.
mysql-test/suite/maria/lock.result
View file @
56045ef9
...
...
@@ -166,3 +166,14 @@ test.t1 optimize status Table is already up to date
disconnect con1;
connection default;
DROP TABLE t1, t2;
#
# MDEV-22829 SIGSEGV in _ma_reset_history on LOCK
#
CREATE TABLE t1 (f1 INT) ENGINE=Aria;
CREATE TABLE t2 (f2 INT) ENGINE=Aria;
LOCK TABLES t2 WRITE, t1 WRITE;
INSERT INTO t1 VALUES (1);
CREATE TRIGGER ai AFTER INSERT ON t1 FOR EACH ROW UPDATE t1 SET v=1 WHERE b=new.a;
ERROR 42S22: Unknown column 'a' in 'NEW'
UNLOCK TABLES;
DROP TABLE t1, t2;
mysql-test/suite/maria/lock.test
View file @
56045ef9
...
...
@@ -185,3 +185,16 @@ OPTIMIZE TABLE t1;
--
disconnect
con1
--
connection
default
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-22829 SIGSEGV in _ma_reset_history on LOCK
--
echo
#
CREATE
TABLE
t1
(
f1
INT
)
ENGINE
=
Aria
;
CREATE
TABLE
t2
(
f2
INT
)
ENGINE
=
Aria
;
LOCK
TABLES
t2
WRITE
,
t1
WRITE
;
INSERT
INTO
t1
VALUES
(
1
);
--
error
ER_BAD_FIELD_ERROR
CREATE
TRIGGER
ai
AFTER
INSERT
ON
t1
FOR
EACH
ROW
UPDATE
t1
SET
v
=
1
WHERE
b
=
new
.
a
;
UNLOCK
TABLES
;
DROP
TABLE
t1
,
t2
;
sql/sql_trigger.cc
View file @
56045ef9
...
...
@@ -558,7 +558,11 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
/* Later on we will need it to downgrade the lock */
mdl_ticket
=
table
->
mdl_ticket
;
if
(
wait_while_table_is_used
(
thd
,
table
,
HA_EXTRA_FORCE_REOPEN
))
/*
RENAME ensures that table is flushed properly and locked tables will
be removed from the active transaction
*/
if
(
wait_while_table_is_used
(
thd
,
table
,
HA_EXTRA_PREPARE_FOR_RENAME
))
goto
end
;
lock_upgrade_done
=
TRUE
;
...
...
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