mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-16041 Do not write for null update (properly fix MySQL Bug#29157)
InnoDB takes a lot of time to perform null updates. The reason is that
even though an empty update vector was created, InnoDB will go on to
write undo log records and update the system columns
DB_TRX_ID and DB_ROLL_PTR in the clustered index, and of course write
redo log for all this.
This could have been fixed properly in
commit 54a492ecac more than 10 years ago.
This commit is contained in:
@@ -1335,11 +1335,17 @@ UPDATE t6 SET b = "updated by client 2";
|
||||
SELECT * FROM t6;
|
||||
a b aa bb
|
||||
1 inserted by client 1 1 inserted by client 1
|
||||
2 updated by client 2 2 inserted by client 1
|
||||
2 inserted by client 1 2 inserted by client 1
|
||||
3 inserted by client 1 3 inserted by client 1
|
||||
4 updated by client 2 4 inserted by client 1
|
||||
5 updated by client 2 NULL NULL
|
||||
10 updated by client 2 1 inserted by client 1
|
||||
SELECT * FROM t6 LOCK IN SHARE MODE;
|
||||
a b aa bb
|
||||
2 updated by client 2 2 inserted by client 1
|
||||
4 updated by client 2 4 inserted by client 1
|
||||
5 updated by client 2 NULL NULL
|
||||
10 updated by client 2 1 inserted by client 1
|
||||
SELECT COUNT(*) FROM t6;
|
||||
COUNT(*)
|
||||
6
|
||||
|
||||
Reference in New Issue
Block a user