mariadb/tests
Dmitry Shulga f99d141cd2 MDEV-20516: Assertion `!lex->proc_list.first && !lex->result && !lex->param_list.elements' failed in mysql_create_view
Execution of the CREATE VIEW statement sent via binary protocol
where the flags of the COM_STMT_EXECUTE request a cursor to be opened
before running the statement results in an assert failure.

This assert fails since the data member thd->lex->result has not null
value pointing to an instance of the class Select_materialize.
The data member thd->lex->result is assigned a pointer to the class
Select_materialize in the function mysql_open_cursor() that invoked
in case the packet COM_STMT_EXECUTE requests a cursor to be opened.

After thd->lex->result is assigned a pointer to an instance of the
class Select_materialize the function mysql_create_view() is called
(indirectly via the function mysql_execute_statement()) and the assert
fails.

The assert
  DBUG_ASSERT(!lex->proc_list.first && !lex->result &&
              !lex->param_list.elements);

was added by the commit 591c06d4b7.
Unfortunately , the condition
  !lex->result
was specified incorrect. It was supposed that the thd->lex->result
is set only by parser on handling the clauses SELECT ... INTO
but indeed it is also set inside mysql_open_cursor() and
that fact was missed by the assert's condition.

So, the fix for this issue is to just remove the condition
  !lex->result
from the failing assert.
2022-01-22 12:46:06 +07:00
..
async_queries.c Merge branch '5.5' into 10.0 2016-09-27 09:21:19 +02:00
auto_increment.res
auto_increment.tst
big_record.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
bug25714.c Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
check_async_queries.pl MWL#192: Non-blocking client API for libmysqlclient. 2011-09-20 12:49:25 +02:00
CMakeLists.txt Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
connect_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
consistent_snapshot.pl MWL#116: Efficient group commit: PBXT part 2010-10-15 15:42:06 +02:00
deadlock_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
drop_test.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
export.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
fork2_test.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
fork_big.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
fork_big2.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
function.res
function.tst
grant.res
index_corrupt.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
insert_and_repair.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
insert_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
list_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
lock_test.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
lock_test.res
mail_to_db.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
myisam-big-rows.tst
mysql_client_fw.c Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
mysql_client_test.c MDEV-20516: Assertion `!lex->proc_list.first && !lex->result && !lex->param_list.elements' failed in mysql_create_view 2022-01-22 12:46:06 +07:00
nonblock-wrappers.h After-review changes 2016-09-12 17:51:50 +02:00
pmail.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
rename_test.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
restore-lock.smack
select_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
showdb_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
ssl_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
table_types.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
test_delayed_insert.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
thread_test.c Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
truncate.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00