enterprise-support team mailing list archive
-
enterprise-support team
-
Mailing list archive
-
Message #05972
[Bug 1660591] [NEW] 5.7 crashes when querying through PK(UK) index
Public bug reported:
Bug description:
Querying using PK(UK) crashes the server.
How to repeat:
## Table Schema
CREATE TABLE `tab` (
`col1` int(11) NOT NULL,
`col2` int(11) NOT NULL,
`col3` text COLLATE utf8mb4_bin,
PRIMARY KEY (`col1`,`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ;
## Generate Test Data
mysql> insert ignore into tab select rand()*100, rand()*100, uuid();
mysql> insert ignore into tab select rand()*100, rand()*100, uuid() from tab;
.. loop until 10201 rows ..
mysql> select count(*) from tab;
+----------+
| count(*) |
+----------+
| 10201 |
+----------+
mysql> select * from tab
-> where
-> (col1 = 2 and col2 = 1) or
-> (col1 in (3, 100) and col2 = 10) or
-> (col1 = 1 and col2 = 2) or
-> (col1 in (1, 2, 3) and col2 = 2);
ERROR 2013 (HY000): Lost connection to MySQL server during query
In this case I simply repositioned the bottom-most condition, and the server did not crash.
mysql> select * from tab
-> where
-> (col1 = 2 and col2 = 1) or
-> (col1 in (1, 2, 3) and col2 = 2) or
-> (col1 in (3, 100) and col2 = 10) or
-> (col1 = 1 and col2 = 2);
I did not get a crash when I gave the hint to not use the index.
How bug should be fixed:
Do not crash.
** Affects: mysql-server
Importance: Unknown
Status: Unknown
** Affects: percona-server
Importance: Undecided
Status: Confirmed
** Tags: i166448
** Tags added: i166448
** Changed in: percona-server
Status: New => Confirmed
** Bug watch added: MySQL Bug System #84736
http://bugs.mysql.com/bug.php?id=84736
** Also affects: mysql-server via
http://bugs.mysql.com/bug.php?id=84736
Importance: Unknown
Status: Unknown
--
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1660591
Title:
5.7 crashes when querying through PK(UK) index
To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/1660591/+subscriptions
Follow ups