mariadb/mysql-test/suite/funcs_1/r
Igor Babaev 3a9358a410 MDEV-28883 Re-design the upper level of handling UPDATE and DELETE statements
This patch introduces a new way of handling UPDATE and DELETE commands at
the top level after the parsing phase. This new way of processing update
and delete statements can be seen in the implementation of the  prepare()
and execute() methods from the new Sql_cmd_dml class. This class derived
from the Sql_cmd class can be considered as an interface class for processing
such commands as SELECT, INSERT, UPDATE, DELETE and other comands
manipulating data in tables.
With this patch processing of update and delete statements after parsing
proceeds by the following schema:
  - precheck of the access rights is performed for the used tables
  - the used tables are opened
  - context analysis phase is performed for the statement
  - the used tables are locked
  - the statement is optimized and executed
  - clean-up is performed for the statement
The implementation of the method Sql_cmd_dml::execute() adheres this schema.
The virtual functions of the class Sql_cmd_dml used for precheck of the
access rights, context analysis, optimization and execution allow to adjust
this schema for processing data manipulation statements of any types.

This schema of processing data manipulation statements is taken from the
current MySQL code. Moreover the definition the class Sql_cmd_dml introduced
in this patch is almost a full replica of such class in the existing MySQL.
However the implementation of the derived classes for update and delete
statements is quite different. This implementation employs the JOIN class
for all kinds of update and delete statements. It allows to perform main
bulk of context analysis actions by the function JOIN::prepare(). This
guarantees that characteristics and properties of the statement tree
discovered for optimization phase when doing context analysis are the same
for single-table and multi-table updates and deletes.

With this patch the following functions are gone:
  mysql_prepare_update(), mysql_multi_update_prepare(),
  mysql_update(), mysql_multi_update(),
  mysql_prepare_delete(), mysql_multi_delete_prepare(), mysql_delete().
The code within these functions have been used as much as possible though.
The functions mysql_test_update() and mysql_test_delete() are also not
needed anymore. The method Sql_cmd_dml::prepare() serves processing
  - update/delete statement
  - PREPARE stmt FROM "<update/delete statement>"
  - EXECUTE stmt when stmt is prepared from update/delete statement.

Approved by Oleksandr Byelkin <sanja@mariadb.com>
2023-03-15 17:35:22 -07:00
..
charset_collation.result MDEV-27009 Add UCA-14.0.0 collations 2022-08-10 15:04:24 +02:00
innodb_bitdata.result
innodb_cursors.result
innodb_func_view.result Merge 10.6 into 10.7 2022-07-27 18:26:21 +03:00
innodb_storedproc_02.result MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error 2020-04-01 11:34:32 +02:00
innodb_storedproc_03.result
innodb_storedproc_06.result MDEV-28548: ER_TABLEACCESS_DENIED_ERROR is missing information about DB 2022-09-30 08:48:57 +02:00
innodb_storedproc_07.result
innodb_storedproc_08.result
innodb_storedproc_10.result Affected rows for a SP now includes affected rows for all statements 2017-08-24 01:05:52 +02:00
innodb_trig_03.result Merge 10.10 into 10.11 2022-12-14 09:18:30 +02:00
innodb_trig_03e.result MDEV-29668 SUPER should not allow actions that have fine-grained dedicated privileges 2023-02-06 14:31:48 +01:00
innodb_trig_08.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
innodb_trig_09.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
innodb_trig_0102.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
innodb_trig_0407.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
innodb_trig_1011ext.result Merge 10.6 into 10.7 2022-09-21 09:33:07 +03:00
innodb_trig_frkey.result
innodb_views.result Adjusted test results after the fix for MDEV-20411 2021-06-26 08:51:17 -07:00
is_basics_mixed.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_character_sets.result Merge 10.9 into 10.10 2022-09-21 10:59:56 +03:00
is_check_constraints.result Merge 10.10 into 10.11 2022-12-14 09:18:30 +02:00
is_cml_innodb.result
is_cml_memory.result
is_cml_myisam.result
is_coll_char_set_appl.result Merge 10.9 into 10.10 2022-09-21 10:59:56 +03:00
is_collations.result MDEV-28883 Re-design the upper level of handling UPDATE and DELETE statements 2023-03-15 17:35:22 -07:00
is_column_privileges.result Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
is_column_privileges_is_mysql_test.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_columns.result Merge branch '10.9' into 10.10 2022-10-04 13:32:38 +02:00
is_columns_innodb.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
is_columns_is.result Added test cases for preceding test 2023-02-03 00:00:35 +03:00
is_columns_is_embedded.result Added test cases for preceding test 2023-02-03 00:00:35 +03:00
is_columns_memory.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
is_columns_myisam.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
is_columns_myisam_embedded.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
is_columns_mysql.result MDEV-29776 collation_connection and db_collation are too short in mysql.proc and mysql.event 2022-10-13 18:45:30 +04:00
is_columns_mysql_embedded.result MDEV-29776 collation_connection and db_collation are too short in mysql.proc and mysql.event 2022-10-13 18:45:30 +04:00
is_engines.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
is_engines_archive.result MDEV-16342 SHOW ENGINES: MyISAM description is useless 2018-06-11 09:57:54 +02:00
is_engines_blackhole.result
is_engines_csv.result MDEV-16342 SHOW ENGINES: MyISAM description is useless 2018-06-11 09:57:54 +02:00
is_engines_federated.result Fix various spelling errors still found in code 2021-03-22 18:10:39 +11:00
is_engines_innodb.result
is_engines_memory.result
is_engines_merge.result
is_engines_myisam.result MDEV-16342 SHOW ENGINES: MyISAM description is useless 2018-06-11 09:57:54 +02:00
is_events.result Merge 10.9 into 10.10 2022-09-21 10:59:56 +03:00
is_key_column_usage.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
is_key_column_usage_embedded.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
is_routines.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_routines_embedded.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_schema_privileges.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_schema_privileges_is_mysql_test.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_schemata.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_schemata_embedded.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_schemata_is_mysql_test.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_statistics.result Merge 10.10 into 10.11 2022-12-14 09:18:30 +02:00
is_statistics_is.result MDEV-7317: Make an index ignorable to the optimizer 2021-03-04 22:50:00 +05:30
is_statistics_mysql.result MDEV-7317: Make an index ignorable to the optimizer 2021-03-04 22:50:00 +05:30
is_statistics_mysql_embedded.result MDEV-7317: Make an index ignorable to the optimizer 2021-03-04 22:50:00 +05:30
is_table_constraints.result Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
is_table_constraints_is.result
is_table_constraints_mysql.result MDEV-17658 change the structure of mysql.user table 2018-12-12 00:31:44 +01:00
is_table_constraints_mysql_embedded.result MDEV-17658 change the structure of mysql.user table 2018-12-12 00:31:44 +01:00
is_table_privileges.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
is_tables.result Merge 10.9 into 10.10 2022-09-21 10:59:56 +03:00
is_tables_embedded.result Merge 10.9 into 10.10 2022-09-21 10:59:56 +03:00
is_tables_innodb.result Added Max_index_length and Temporary to SHOW TABLE STATUS 2018-02-12 17:17:26 +02:00
is_tables_is.result Added test cases for preceding test 2023-02-03 00:00:35 +03:00
is_tables_is_embedded.result Added test cases for preceding test 2023-02-03 00:00:35 +03:00
is_tables_memory.result Added Max_index_length and Temporary to SHOW TABLE STATUS 2018-02-12 17:17:26 +02:00
is_tables_myisam.result Added Max_index_length and Temporary to SHOW TABLE STATUS 2018-02-12 17:17:26 +02:00
is_tables_myisam_embedded.result Added Max_index_length and Temporary to SHOW TABLE STATUS 2018-02-12 17:17:26 +02:00
is_tables_mysql.result MDEV-8334: Rename utf8 to utf8mb3 2021-05-19 06:48:36 +02:00
is_tables_mysql_embedded.result MDEV-8334: Rename utf8 to utf8mb3 2021-05-19 06:48:36 +02:00
is_triggers.result Merge branch '10.9' into 10.10 2022-10-04 13:32:38 +02:00
is_triggers_embedded.result Merge 10.9 into 10.10 2022-09-21 10:59:56 +03:00
is_user_privileges.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_views.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
is_views_embedded.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
memory_bitdata.result
memory_cursors.result
memory_func_view.result Merge 10.6 into 10.7 2022-07-27 18:26:21 +03:00
memory_storedproc_02.result MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error 2020-04-01 11:34:32 +02:00
memory_storedproc_03.result
memory_storedproc_06.result MDEV-28548: ER_TABLEACCESS_DENIED_ERROR is missing information about DB 2022-09-30 08:48:57 +02:00
memory_storedproc_07.result
memory_storedproc_08.result
memory_storedproc_10.result Affected rows for a SP now includes affected rows for all statements 2017-08-24 01:05:52 +02:00
memory_trig_03.result Merge 10.10 into 10.11 2022-12-14 09:18:30 +02:00
memory_trig_03e.result MDEV-29668 SUPER should not allow actions that have fine-grained dedicated privileges 2023-02-06 14:31:48 +01:00
memory_trig_08.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
memory_trig_09.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
memory_trig_0102.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
memory_trig_0407.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
memory_trig_1011ext.result Merge 10.6 into 10.7 2022-09-21 09:33:07 +03:00
memory_views.result Adjusted test results after the fix for MDEV-20411 2021-06-26 08:51:17 -07:00
myisam_bitdata.result
myisam_cursors.result
myisam_func_view.result Merge 10.6 into 10.7 2022-07-27 18:26:21 +03:00
myisam_storedproc_02.result MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error 2020-04-01 11:34:32 +02:00
myisam_storedproc_03.result
myisam_storedproc_06.result MDEV-28548: ER_TABLEACCESS_DENIED_ERROR is missing information about DB 2022-09-30 08:48:57 +02:00
myisam_storedproc_07.result
myisam_storedproc_08.result
myisam_storedproc_10.result Affected rows for a SP now includes affected rows for all statements 2017-08-24 01:05:52 +02:00
myisam_trig_03.result Merge 10.10 into 10.11 2022-12-14 09:18:30 +02:00
myisam_trig_03e.result MDEV-29668 SUPER should not allow actions that have fine-grained dedicated privileges 2023-02-06 14:31:48 +01:00
myisam_trig_08.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
myisam_trig_09.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
myisam_trig_0102.result MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows 2021-10-26 17:29:40 +02:00
myisam_trig_0407.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
myisam_trig_1011ext.result Merge 10.6 into 10.7 2022-09-21 09:33:07 +03:00
myisam_views-big.result Adjusted test results after the fix for MDEV-20411 (2) 2021-06-26 23:11:10 -07:00
processlist_priv_no_prot.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
processlist_priv_ps.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
processlist_val_no_prot.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
processlist_val_ps.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
row_count_func.result
storedproc.result Merge branch '10.8' into 10.9 2022-10-04 13:23:13 +02:00