mariadb/mysql-test/suite/federated
Rex 7302e97116 MDEV-30073 Wrong result on 2nd execution of PS for query with NOT EXISTS
This bug is consequence of a serious architectural flaw of the query
processing at the prepare stage. Context analysis of processed queries has
to be done at this stage. The important part of this analysis is resolution
of column references also known as name resolution. The items for column
references used in a query are created by the parser. They are allocated
in the statement memory because their life span is the same as the life
span of the executed query. During name resolution some of the items are
wrapped into objects belonging to classes derived from the Item_ref class.
In many cases we can't do without such wrappers. For example, the parser
does not differentiate between references to columns of base tables and
references to columns of views. However for a reference to a view column
we need a pointer to the translation item for this column. This pointer
is stored in a Item_direct_view_ref object that wraps the item for the
column reference. Before this patch the wrappers were allocated in
execution memory good only for one execution. That wasn't a problem when
the query was executed only once. Yet for the queries executed as prepared
statements or within a stored procedure it could lead to crashes or wrong
result sets at the second execution of the query. It could happen when
the wrapped item was substituted for something else by permanent
transformations during the optimization phase.

This patch allocates all the wrappers around items created for column
references in the statement memory at the first execution of PS or at the
first call of SP/SF.

Author:  Igor Babaev
Commiter: Rex Johnston (rex.johnston@mariadb.com)
2025-06-04 05:27:47 +11:00
..
include
assisted_discovery.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
assisted_discovery.test MDEV-17227 Server crash in TABLE_SHARE::init_from_sql_statement_string upon table discovery with non-existent database 2021-01-12 10:25:04 +01:00
combinations
disabled.def
error_on_close-8313.result Write information about restart in .result 2019-04-01 19:47:24 +03:00
error_on_close-8313.test
error_row_number.result MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table 2021-10-26 17:29:40 +02:00
error_row_number.test MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table 2021-10-26 17:29:40 +02:00
federated.result
federated.test
federated_archive.result
federated_archive.test
federated_bug_13118.result
federated_bug_13118.test
federated_bug_25714.result
federated_bug_25714.test
federated_bug_32426.result
federated_bug_32426.test
federated_bug_35333.result
federated_bug_35333.test
federated_bug_585688.result
federated_bug_585688.test
federated_debug-master.opt
federated_debug.result
federated_debug.test
federated_innodb.result
federated_innodb.test
federated_maybe_16324629.result
federated_maybe_16324629.test
federated_partition-slave.opt
federated_partition.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
federated_partition.test Merge 10.2 into 10.3 2021-08-18 12:26:58 +03:00
federated_server.result MDEV-21743: Re-record --big-test results 2020-03-11 08:29:48 +02:00
federated_server.test
federated_transactions.result
federated_transactions.test
federated_type_inet6.result MDEV-20806 Federated does not work with INET6, returns NULL with warning ER_TRUNCATED_WRONG_VALUE 2019-10-12 07:25:53 +04:00
federated_type_inet6.test MDEV-20806 Federated does not work with INET6, returns NULL with warning ER_TRUNCATED_WRONG_VALUE 2019-10-12 07:25:53 +04:00
federatedx.result Allow 'mariadb' as a connection wrapper name for FederatedX. 2025-02-25 16:04:56 +02:00
federatedx.test Allow 'mariadb' as a connection wrapper name for FederatedX. 2025-02-25 16:04:56 +02:00
federatedx_create_handlers.result MDEV-30073 Wrong result on 2nd execution of PS for query with NOT EXISTS 2025-06-04 05:27:47 +11:00
federatedx_create_handlers.test MDEV-30073 Wrong result on 2nd execution of PS for query with NOT EXISTS 2025-06-04 05:27:47 +11:00
federatedx_versioning.result Merge 10.3 into 10.4 2022-09-13 16:36:38 +03:00
federatedx_versioning.test MDEV-28632 Change default of explicit_defaults_for_timestamp to ON 2022-08-10 15:03:22 +02:00
have_federatedx.inc MDEV-16342 SHOW ENGINES: MyISAM description is useless 2018-06-11 09:57:54 +02:00
have_federatedx.opt
indexes.result MDEV-27398 DESC index causes wrong (empty) result on Federated tables 2022-01-26 18:43:06 +01:00
indexes.test MDEV-27398 DESC index causes wrong (empty) result on Federated tables 2022-01-26 18:43:06 +01:00
my.cnf
net_thd_crash-12725.result Write information about restart in .result 2019-04-01 19:47:24 +03:00
net_thd_crash-12725.test
net_thd_crash-12951.result Write information about restart in .result 2019-04-01 19:47:24 +03:00
net_thd_crash-12951.test
optimizer.result MDEV-14907 FEDERATEDX doesn't respect DISTINCT 2022-01-05 16:52:39 +02:00
optimizer.test MDEV-14907 FEDERATEDX doesn't respect DISTINCT 2022-01-05 16:52:39 +02:00
rpl.result test cases for MySQL bugs 2022-01-21 16:02:34 +01:00
rpl.test federated.rpl failed if federatedx was not compiled 2022-03-01 11:36:39 +02:00
suite.pm
timestamps.result MDEV-16157 federated corrupts timestamps 2018-05-17 15:33:39 +02:00
timestamps.test MDEV-16157 federated corrupts timestamps 2018-05-17 15:33:39 +02:00
update.result MDEV-32984 Update federated table and column privileges 2024-01-10 10:16:20 +01:00
update.test MDEV-32984 Update federated table and column privileges 2024-01-10 10:16:20 +01:00