Assertion failed: virtual bool drizzled::Item_in_subselect::exec(): Assertion `exec_method != MATERIALIZATION || (exec_method == MATERIALIZATION && engine->engine_type() == subselect_engine::HASH_SJ_ENGINE)'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Stewart Smith | ||
Dexter |
Fix Released
|
Medium
|
Stewart Smith |
Bug Description
We're seeing this crash on certain queries with our randgen testing:
http://
This is MySQL bug (with a fix) - Bug #46680 Assertion failed in file item_subselect.cc, line 305 crashing on HAVING subquery
http://
Test case (taken from the MySQL bug):
CREATE TABLE t1 (
pk int NOT NULL AUTO_INCREMENT,
varchar_nokey varchar(1) DEFAULT NULL,
PRIMARY KEY (pk)
) AUTO_INCREMENT=101 ;
INSERT INTO t1 VALUES (1,'c'), (2, NULL);
CREATE TABLE t2 (
pk int NOT NULL AUTO_INCREMENT,
varchar_nokey varchar(1) DEFAULT NULL,
PRIMARY KEY (pk)
) AUTO_INCREMENT=21 ;
INSERT INTO t2 VALUES
(3,'m'),(4,NULL);
SELECT MIN(t2.pk)
FROM t2 JOIN t1 ON t1.pk=t2.pk
WHERE 'j'
HAVING ('m') IN (
SELECT varchar_nokey
FROM t2);
Related branches
- Drizzle Developers: Pending requested
-
Diff: 375 lines (+304/-9)3 files modifieddrizzled/join.cc (+15/-9)
tests/r/bug588408.result (+152/-0)
tests/t/bug588408.test (+137/-0)
Changed in drizzle: | |
assignee: | nobody → Stewart Smith (stewart-flamingspork) |
milestone: | none → 2010-06-07 |
status: | New → Confirmed |
Changed in drizzle: | |
status: | Confirmed → Fix Committed |
importance: | Undecided → Medium |
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
status: | Fix Released → Fix Committed |
status: | Fix Committed → Fix Released |
I made an attempt to port the patch over. Also the tests (also attached).
However... not sure if this is anything:
--- /home/stewart/ drizzle/ working/ tests/r/bug588408.result 2010-06-02 06:50:31.242011816 +0300 drizzle/ working/ tests/r/bug588408.reject 2010-06-02 06:59:48.430702393 +0300
+++ /home/stewart/
@@ -118,7 +118,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found
3 SUBQUERY t2 ALL NULL NULL NULL NULL 2
-2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+2 DERIVED empty1 ALL NULL NULL NULL NULL 1
#
# 5) Test that subquery materialization is setup for query with
@@ -142,8 +142,9 @@
SELECT v
FROM t2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 PRIMARY t1 index NULL PRIMARY 4 NULL 2 Using where; Using index
3 SUBQUERY t2 ALL NULL NULL NULL NULL 2
+2 SUBQUERY t3 index PRIMARY PRIMARY 4 NULL 1 Using where; Using index
#
# Cleanup for BUG#46680
#