1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.4' into 10.5

This commit is contained in:
Oleksandr Byelkin
2022-02-01 20:33:04 +01:00
460 changed files with 9909 additions and 2408 deletions

View File

@ -406,8 +406,18 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
bool res= FALSE;
DBUG_ENTER("mysql_create_view");
/* This is ensured in the parser. */
DBUG_ASSERT(!lex->proc_list.first && !lex->result &&
/*
This is ensured in the parser.
NOTE: Originally, the assert below contained the extra condition
&& !lex->result
but in this form the assert is failed in case CREATE VIEW run under
cursor (the case when the byte 'flags' in the COM_STMT_EXECUTE packet has
the flag CURSOR_TYPE_READ_ONLY set). For the cursor use case
thd->lex->result is assigned a pointer to the class Select_materialize
inside the function mysql_open_cursor() just before handling of a statement
will be started and the function mysql_create_view() called.
*/
DBUG_ASSERT(!lex->proc_list.first &&
!lex->param_list.elements);
/*