Interrupting a query inside InnoDB causes an unrelated warning to be raised
Bug #1115158 reported by
Vlad Lesin
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Low
|
Vlad Lesin | ||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | ||
5.5 |
Won't Fix
|
Low
|
Unassigned | ||
5.6 |
Fix Released
|
Low
|
Vlad Lesin |
Bug Description
Upstream bug 64556 (the description can be seen here: http://
Related branches
lp:~vlad-lesin/percona-server/5.6-sql_timeout_twitter
- Alexey Kopytov (community): Approve
- Sergei Glushchenko (community): Needs Fixing (g2)
-
Diff: 2612 lines (+1997/-29)40 files modifiedPercona-Server/config.h.cmake (+4/-0)
Percona-Server/configure.cmake (+19/-1)
Percona-Server/include/my_global.h (+13/-0)
Percona-Server/include/my_timer.h (+69/-0)
Percona-Server/include/mysql/plugin.h (+7/-0)
Percona-Server/include/mysql/plugin_audit.h.pp (+1/-0)
Percona-Server/include/mysql/plugin_auth.h.pp (+1/-0)
Percona-Server/include/mysql/plugin_ftparser.h.pp (+1/-0)
Percona-Server/include/mysql/thread_pool_priv.h (+6/-0)
Percona-Server/libmysqld/CMakeLists.txt (+3/-0)
Percona-Server/mysql-test/include/have_statement_timeout.inc (+4/-0)
Percona-Server/mysql-test/r/have_statement_timeout.require (+2/-0)
Percona-Server/mysql-test/r/max_statement_time_func.result (+116/-0)
Percona-Server/mysql-test/r/mysqld--help-notwin.result (+4/-0)
Percona-Server/mysql-test/r/mysqld--help-win.result (+4/-0)
Percona-Server/mysql-test/suite/sys_vars/r/have_statement_timeout_basic.result (+53/-0)
Percona-Server/mysql-test/suite/sys_vars/r/max_statement_time_basic.result (+89/-0)
Percona-Server/mysql-test/suite/sys_vars/t/have_statement_timeout_basic.test (+55/-0)
Percona-Server/mysql-test/suite/sys_vars/t/max_statement_time_basic.test (+78/-0)
Percona-Server/mysql-test/t/max_statement_time_func.test (+154/-0)
Percona-Server/mysys/CMakeLists.txt (+8/-0)
Percona-Server/mysys/kqueue_timers.c (+219/-0)
Percona-Server/mysys/posix_timers.c (+256/-0)
Percona-Server/sql/CMakeLists.txt (+4/-0)
Percona-Server/sql/handler.cc (+18/-0)
Percona-Server/sql/handler.h (+4/-0)
Percona-Server/sql/mysqld.cc (+22/-0)
Percona-Server/sql/set_var.h (+1/-0)
Percona-Server/sql/share/errmsg-utf8.txt (+3/-0)
Percona-Server/sql/signal_handler.cc (+3/-0)
Percona-Server/sql/sql_class.cc (+39/-15)
Percona-Server/sql/sql_class.h (+13/-0)
Percona-Server/sql/sql_parse.cc (+89/-1)
Percona-Server/sql/sql_timer.cc (+253/-0)
Percona-Server/sql/sql_timer.h (+50/-0)
Percona-Server/sql/sys_vars.cc (+10/-0)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+49/-3)
Percona-Server/storage/innobase/include/lock0lock.h (+10/-0)
Percona-Server/storage/innobase/include/lock0priv.h (+0/-9)
Percona-Server/unittest/mysys/my_timer-t.c (+263/-0)
Changed in percona-server: | |
assignee: | nobody → Vlad Lesin (vlad-lesin) |
To post a comment you must log in.
The problem also occurs with queries that fail.
I ran an ALTER TABLE statement that failed due to a zero datetime column (sql_mode contains NO_ZERO_ DATE,NO_ ZERO_IN_ DATE)
ALTER TABLE `Test`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`, `date_time`),
ENGINE=InnoDB ROW_FORMAT=DYNAMIC
PARTITION BY RANGE COLUMNS(date_time) (
PARTITION p201206 VALUES LESS THAN ('2012-07-01 00:00:00'),
PARTITION p201412 VALUES LESS THAN ('2015-01-01 00:00:00'),
PARTITION p2015 VALUES LESS THAN ('2016-01-01 00:00:00'),
PARTITION p9999 VALUES LESS THAN MAXVALUE
);
ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_time' at row 1
mysql> show warnings; -+----- -+----- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ -+----- -+----- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ -+----- -+----- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+
+------
| Level | Code | Message |
+------
| Error | 1292 | Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_time' at row 1 |
| Error | 1317 | Query execution was interrupted |
| Error | 152 | InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 20. Please drop extra constraints and try again |
+------
3 rows in set (0.00 sec)
mysql> show warnings\G ******* ******* ****** 1. row ******* ******* ******* ****** ******* ******* ****** 2. row ******* ******* ******* ****** ******* ******* ****** 3. row ******* ******* ******* ******
*******
Level: Error
Code: 1292
Message: Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_time' at row 1
*******
Level: Error
Code: 1317
Message: Query execution was interrupted
*******
Level: Error
Code: 152
Message: InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 20. Please drop extra constraints and try again
3 rows in set (0.00 sec)
mysql> select * from Test\G ******* ******* ****** 1. row ******* ******* ******* ******
*******
id: 336823180
date_time: 0000-00-00 00:00:00
1 row in set (0.00 sec)
mysql> show create table Test\G ******* ******* ****** 1. row ******* ******* ******* ****** 336823181 DEFAULT CHARSET=latin1
*******
Table: Test
Create Table: CREATE TABLE `Test` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`date_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=
1 row in set (0.00 sec)
Server version: 5.5.32-31.0-log Percona Server (GPL), Release rel31.0, Revision 549