1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-24230 subquery on information_schema fails with error message

disable thd->count_cuted_fields when populating internal temporary
tables for I_S, because this is how SELECT works standalone.
And if the SELECT is a part of INSERT or UPDATE or RETURN or SET or
anything else that enables thd->count_cuted_fields, this counting should
only apply when storing the result of the SELECT in a field or a
variable, not when populating internal temporary tables for I_S.
This commit is contained in:
Sergei Golubchik
2020-11-24 21:33:50 +01:00
parent 00f54b56b1
commit f3b10354a9
3 changed files with 16 additions and 13 deletions

View File

@ -1925,8 +1925,6 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a'
--echo # End of 10.1 tests
--echo #
--echo #
--echo # Start of 10.2 Test
--echo #
--echo # MDEV-14836: Assertion `m_status == DA_ERROR' failed in
--echo # Diagnostics_area::sql_errno upon query from I_S with LIMIT ROWS EXAMINED
@ -2000,6 +1998,14 @@ from information_schema.TABLE_CONSTRAINTS tc
drop table t;
--echo #
--echo # MDEV-24230 subquery on information_schema fails with error message
--echo #
create table t1 (n int);
create table t2 (n int);
insert into t1 set n = (select table_rows from information_schema.tables where table_name='t2');
drop table t1, t2;
--echo #
--echo # End of 10.3 tests
--echo #