mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-36596 Assertion failure in TABLE_SHARE::init_from_sql_statement_string upon returning wrong type from function
WHERE clause evaluation can fail
This commit is contained in:
@@ -36,3 +36,11 @@ index_name comment
|
||||
a disabled
|
||||
drop table t1;
|
||||
# End of 10.5 tests
|
||||
#
|
||||
# MDEV-36596 Assertion failure in TABLE_SHARE::init_from_sql_statement_string upon returning wrong type from function
|
||||
#
|
||||
create function f() returns int return (1>2,1,2);
|
||||
select * from information_schema.columns where f() is null;
|
||||
ERROR HY000: Cannot cast 'row' as 'int' in assignment of `(null)`
|
||||
drop function f;
|
||||
# End of 11.8 tests
|
||||
|
@@ -28,3 +28,13 @@ select index_name, comment from information_schema.statistics where table_schema
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-36596 Assertion failure in TABLE_SHARE::init_from_sql_statement_string upon returning wrong type from function
|
||||
--echo #
|
||||
create function f() returns int return (1>2,1,2);
|
||||
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
|
||||
select * from information_schema.columns where f() is null;
|
||||
drop function f;
|
||||
|
||||
--echo # End of 11.8 tests
|
||||
|
@@ -5622,6 +5622,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
|
||||
if (!partial_cond || partial_cond->val_bool())
|
||||
{
|
||||
if (thd->is_error())
|
||||
goto err;
|
||||
/*
|
||||
If table is I_S.tables and open_table_method is 0 (eg SKIP_OPEN)
|
||||
we can skip table opening and we don't have lookup value for
|
||||
|
Reference in New Issue
Block a user