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
0e84886d
Commit
0e84886d
authored
Mar 20, 2007
by
kent@mysql.com/kent-amd64.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/kent/bk/tmp/mysql-5.0-build
parents
39e9a2d3
31b9145a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
mysql-test/r/trigger.result
mysql-test/r/trigger.result
+6
-5
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+3
-3
sql/sql_insert.cc
sql/sql_insert.cc
+5
-5
No files found.
mysql-test/r/trigger.result
View file @
0e84886d
...
@@ -1398,18 +1398,19 @@ id val
...
@@ -1398,18 +1398,19 @@ id val
1 test1
1 test1
2 test2
2 test2
INSERT INTO t1 VALUES (2,'test2') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (2,'test2') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (3,'test3') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (2,'test3') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (3,'test4') ON DUPLICATE KEY UPDATE val=VALUES(val);
SELECT * FROM t1;
SELECT * FROM t1;
id val
id val
1 test1
1 test1
2 test
2
2 test
3
3 test
3
3 test
4
SELECT * FROM t2;
SELECT * FROM t2;
id val
id val
1 test1
1 test1
2 test2
2 test2
3 test
2
3 test
3
4 test
3
4 test
4
DROP TRIGGER trg27006_a_insert;
DROP TRIGGER trg27006_a_insert;
DROP TRIGGER trg27006_a_update;
DROP TRIGGER trg27006_a_update;
drop table t1,t2;
drop table t1,t2;
...
...
mysql-test/t/trigger.test
View file @
0e84886d
...
@@ -1700,8 +1700,7 @@ DROP PROCEDURE bug22580_proc_1;
...
@@ -1700,8 +1700,7 @@ DROP PROCEDURE bug22580_proc_1;
DROP
PROCEDURE
bug22580_proc_2
;
DROP
PROCEDURE
bug22580_proc_2
;
#
#
# Bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE KEY
# Bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE
# UPDATE if the row wasn't actually changed.
#
#
--
disable_warnings
--
disable_warnings
DROP
TRIGGER
IF
EXISTS
trg27006_a_update
;
DROP
TRIGGER
IF
EXISTS
trg27006_a_update
;
...
@@ -1730,7 +1729,8 @@ INSERT INTO t1(val) VALUES ('test1'),('test2');
...
@@ -1730,7 +1729,8 @@ INSERT INTO t1(val) VALUES ('test1'),('test2');
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
SELECT
*
FROM
t2
;
INSERT
INTO
t1
VALUES
(
2
,
'test2'
)
ON
DUPLICATE
KEY
UPDATE
val
=
VALUES
(
val
);
INSERT
INTO
t1
VALUES
(
2
,
'test2'
)
ON
DUPLICATE
KEY
UPDATE
val
=
VALUES
(
val
);
INSERT
INTO
t1
VALUES
(
3
,
'test3'
)
ON
DUPLICATE
KEY
UPDATE
val
=
VALUES
(
val
);
INSERT
INTO
t1
VALUES
(
2
,
'test3'
)
ON
DUPLICATE
KEY
UPDATE
val
=
VALUES
(
val
);
INSERT
INTO
t1
VALUES
(
3
,
'test4'
)
ON
DUPLICATE
KEY
UPDATE
val
=
VALUES
(
val
);
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
SELECT
*
FROM
t2
;
DROP
TRIGGER
trg27006_a_insert
;
DROP
TRIGGER
trg27006_a_insert
;
...
...
sql/sql_insert.cc
View file @
0e84886d
...
@@ -1238,19 +1238,19 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
...
@@ -1238,19 +1238,19 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
if
(
table
->
next_number_field
)
if
(
table
->
next_number_field
)
table
->
file
->
adjust_next_insert_id_after_explicit_value
(
table
->
file
->
adjust_next_insert_id_after_explicit_value
(
table
->
next_number_field
->
val_int
());
table
->
next_number_field
->
val_int
());
info
->
touched
++
;
info
->
touched
++
;
if
((
table
->
file
->
table_flags
()
&
HA_PARTIAL_COLUMN_READ
)
||
if
((
table
->
file
->
table_flags
()
&
HA_PARTIAL_COLUMN_READ
)
||
compare_record
(
table
,
thd
->
query_id
))
compare_record
(
table
,
thd
->
query_id
))
{
{
info
->
updated
++
;
info
->
updated
++
;
info
->
copied
++
;
}
trg_error
=
(
table
->
triggers
&&
trg_error
=
(
table
->
triggers
&&
table
->
triggers
->
process_triggers
(
thd
,
TRG_EVENT_UPDATE
,
table
->
triggers
->
process_triggers
(
thd
,
TRG_EVENT_UPDATE
,
TRG_ACTION_AFTER
,
TRG_ACTION_AFTER
,
TRUE
));
TRUE
));
info
->
copied
++
;
}
goto
ok_or_after_trg_err
;
goto
ok_or_after_trg_err
;
}
}
else
/* DUP_REPLACE */
else
/* DUP_REPLACE */
...
...
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