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
ecd470d1
Commit
ecd470d1
authored
Jun 22, 2009
by
Martin Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
e16cdb29
2cc1134c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
mysql-test/r/trigger.result
mysql-test/r/trigger.result
+14
-0
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+26
-0
sql/sql_insert.cc
sql/sql_insert.cc
+3
-0
No files found.
mysql-test/r/trigger.result
View file @
ecd470d1
...
@@ -2073,4 +2073,18 @@ select @a, @b;
...
@@ -2073,4 +2073,18 @@ select @a, @b;
drop trigger trg1;
drop trigger trg1;
drop trigger trg2;
drop trigger trg2;
drop table t1, t2;
drop table t1, t2;
CREATE TABLE t1 ( a INT, b INT );
CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY, b INT );
INSERT INTO t1 (a) VALUES (1);
CREATE TRIGGER tr1
BEFORE INSERT ON t2
FOR EACH ROW
BEGIN
UPDATE a_nonextisting_table SET a = 1;
END//
CREATE TABLE IF NOT EXISTS t2 ( a INT, b INT ) SELECT a, b FROM t1;
ERROR 42S02: Table 'test.a_nonextisting_table' doesn't exist
SELECT * FROM t2;
a b
DROP TABLE t1, t2;
End of 5.1 tests.
End of 5.1 tests.
mysql-test/t/trigger.test
View file @
ecd470d1
...
@@ -2370,4 +2370,30 @@ drop trigger trg1;
...
@@ -2370,4 +2370,30 @@ drop trigger trg1;
drop
trigger
trg2
;
drop
trigger
trg2
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# Bug#44653: Server crash noticed when executing random queries with partitions.
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
);
CREATE
TABLE
t2
(
a
INT
AUTO_INCREMENT
KEY
,
b
INT
);
INSERT
INTO
t1
(
a
)
VALUES
(
1
);
delimiter
//;
CREATE
TRIGGER
tr1
BEFORE
INSERT
ON
t2
FOR
EACH
ROW
BEGIN
UPDATE
a_nonextisting_table
SET
a
=
1
;
END
//
delimiter
;
//
--
disable_abort_on_error
CREATE
TABLE
IF
NOT
EXISTS
t2
(
a
INT
,
b
INT
)
SELECT
a
,
b
FROM
t1
;
--
enable_abort_on_error
# Caused failed assertion
SELECT
*
FROM
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.1
tests
.
--
echo
End
of
5.1
tests
.
sql/sql_insert.cc
View file @
ecd470d1
...
@@ -3098,7 +3098,10 @@ bool select_insert::send_data(List<Item> &values)
...
@@ -3098,7 +3098,10 @@ bool select_insert::send_data(List<Item> &values)
store_values
(
values
);
store_values
(
values
);
thd
->
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
thd
->
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
if
(
thd
->
is_error
())
if
(
thd
->
is_error
())
{
table
->
auto_increment_field_not_null
=
FALSE
;
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
if
(
table_list
)
// Not CREATE ... SELECT
if
(
table_list
)
// Not CREATE ... SELECT
{
{
switch
(
table_list
->
view_check_option
(
thd
,
info
.
ignore
))
{
switch
(
table_list
->
view_check_option
(
thd
,
info
.
ignore
))
{
...
...
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