[MDEV-3639] LP:872735 - Assertion `tab->ref.use_count' failed in join_read_key_unlock_row() with derived_merge + InnoDB + DISTINCT Created: 2011-10-12 Updated: 2020-08-27 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Query: SELECT * asserts as follows: mysqld: sql_select.cc:15736: void join_read_key_unlock_row(st_join_table*): Assertion `tab->ref.use_count' failed. #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6 explain: id select_type table type possible_keys key key_len ref rows filtered Extra minimal optimizer_switch: derived_merge=ON bzr version-info: revision-id: <email address hidden> test case: --source include/have_innodb.inc CREATE TABLE t2 ( a int NOT NULL ) ; CREATE TABLE t3 ( a int NOT NULL , c int NOT NULL, d varchar(1) NOT NULL, KEY (c) , PRIMARY KEY (a)) ENGINE=InnoDB; SET SESSION optimizer_switch='derived_merge=ON,subquery_cache=off'; SELECT * |
| Comments |
| Comment by Igor Babaev [ 2011-10-12 ] | ||||||||
|
Re: Assertion `tab->ref.use_count' failed in join_read_key_unlock_row() with derived_merge + InnoDB + DISTINCT igor@sophia:~/maria/maria-5.3-r3224/mysql-test> ../client/mysql test This software comes with ABSOLUTELY NO WARRANTY. This is free software, Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [test]> CREATE TABLE t1 ( b int NOT NULL) ENGINE=InnoDB; MariaDB [test]> INSERT IGNORE INTO t1 VALUES (9); MariaDB [test]> MariaDB [test]> INSERT IGNORE INTO t2 VALUES (1); MariaDB [test]> MariaDB [test]> INSERT IGNORE INTO t3 VALUES (14,4,'a'),(15,7,'b'),(16,4,'c'),(17,1,'d'),(18,9,'e'),(19,4,'f'),(20,8,'g'); MariaDB [test]> MariaDB [test]>
--
-- MariaDB [test]> alter table t2 engine=innodb; MariaDB [test]> SELECT * FROM t1 , t2 WHERE ( t2.a , t1.b ) NOT IN ( SELECT DISTINCT c , a FROM ( SELECT * FROM t3 ) AS SQ1_alias1 );
--
-- | ||||||||
| Comment by Philip Stoev (Inactive) [ 2011-10-13 ] | ||||||||
|
Re: Assertion `tab->ref.use_count' failed in join_read_key_unlock_row() with derived_merge + InnoDB + DISTINCT | ||||||||
| Comment by Igor Babaev [ 2011-10-13 ] | ||||||||
|
Re: Assertion `tab->ref.use_count' failed in join_read_key_unlock_row() with derived_merge + InnoDB + DISTINCT CREATE TABLE t1 (b int NOT NULL); CREATE TABLE t2 (a int NOT NULL) ; CREATE TABLE t3 ( SET SESSION optimizer_switch='derived_merge=on,subquery_cache=off'; SELECT * FROM t1 , t2 DROP TABLE t1,t2,t3; | ||||||||
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] | ||||||||
|
Launchpad bug id: 872735 |