Bug #60305 | prepare causes Assertion failed: !thd->lex->context_analysis_only | ||
---|---|---|---|
Submitted: | 2 Mar 2011 14:39 | Modified: | 31 Jan 2013 15:59 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S1 (Critical) |
Version: | 5.0.92,5.1.55, 5.5.9, 5.6.2 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | BENCHMARK, prepare |
[2 Mar 2011 14:39]
Shane Bester
[2 Mar 2011 14:49]
MySQL Verification Team
C:\DBS>c:\dbs\5.5\bin\mysql -uroot --port=3540 --prompt="mysql 5.5 >" Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.11-debug Source distribution Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.5 >prepare s from "select 1 rlike benchmark(1,(select 1)) is null"; ERROR 2013 (HY000): Lost connection to MySQL server during query mysql 5.5 >
[24 Mar 2011 10:36]
MySQL Verification Team
another testcase without benchmark: set names utf8; drop table if exists g1; create table g1(a int,b int)engine=myisam; insert into g1 values (0,1),(2,1); prepare `stmt` from "(select char((select 1) using ascii) as `c` from g1 where `a` <`b` having `c` > '')";
[8 Jun 2011 8:32]
MySQL Verification Team
only affects debug builds.
[22 May 2012 14:29]
MySQL Verification Team
You don't need benchmark or prepared statements in this next testcase (5.6.6-debug). drop table if exists `t1`; create table `t1`(`a` int)engine=innodb; create or replace view `tv0` as select 1 from `t1` `t1_1` right join `t1` `t1_2` on 1 >= some ( select (select 1) as `d` from `t1` as `t1_3` having `d` like `d` ); Version: '5.6.6-m9-debug' socket: '' port: 3306 MySQL Community Server (GPL) Assertion failed: !thd->lex->context_analysis_only, file item_subselect.cc, line 391 mysqld-debug.exe!my_sigabrt_handler()[my_thr_init.c:495] mysqld-debug.exe!raise()[winsig.c:586] mysqld-debug.exe!abort()[abort.c:74] mysqld-debug.exe!_wassert()[assert.c:153] mysqld-debug.exe!Item_subselect::exec()[item_subselect.cc:391] mysqld-debug.exe!Item_singlerow_subselect::val_str()[item_subselect.cc:858] mysqld-debug.exe!Item::str_result()[item.h:1165] mysqld-debug.exe!Item_ref::val_str()[item.cc:7550] mysqld-debug.exe!Item_func_like::fix_fields()[item_cmpfunc.cc:5337] mysqld-debug.exe!JOIN::prepare()[sql_resolver.cc:184] mysqld-debug.exe!subselect_single_select_engine::prepare()[item_subselect.cc:2369] mysqld-debug.exe!Item_subselect::fix_fields()[item_subselect.cc:199] mysqld-debug.exe!Item_in_subselect::fix_fields()[item_subselect.cc:2084] mysqld-debug.exe!Item_func::fix_fields()[item_func.cc:203] mysqld-debug.exe!setup_conds()[sql_base.cc:8866] mysqld-debug.exe!setup_without_group()[sql_resolver.cc:947] mysqld-debug.exe!JOIN::prepare()[sql_resolver.cc:170] mysqld-debug.exe!st_select_lex_unit::prepare()[sql_union.cc:331] mysqld-debug.exe!mysql_create_view()[sql_view.cc:576] mysqld-debug.exe!mysql_execute_command()[sql_parse.cc:4640] mysqld-debug.exe!mysql_parse()[sql_parse.cc:6026] mysqld-debug.exe!dispatch_command()[sql_parse.cc:1275] mysqld-debug.exe!do_command()[sql_parse.cc:998] mysqld-debug.exe!do_handle_one_connection()[sql_connect.cc:942] mysqld-debug.exe!handle_one_connection()[sql_connect.cc:858] mysqld-debug.exe!pthread_start()[my_winthread.c:61] mysqld-debug.exe!_callthreadstartex()[threadex.c:314] mysqld-debug.exe!_threadstartex()[threadex.c:297]
[31 Jan 2013 15:59]
Paul DuBois
Noted in 5.1.69, 5.5.31, 5.6.11, 5.7.1 changelogs. For debug builds, some queries with SELECT ... FROM DUAL nested subqueries raised an assertion.