Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
Test case for MySQL "WL#4179 - Stored programs: validation of stored program statements" fails in 10.0.
Test diff attached. Please try to apply test case as is unless it is applicable.
Changes introduced by the task MDEV-5816.
---------------------------------------------
Main logic of SP instructions processing is modified to support handling of tables metadata change the Stored routine's instructions depends on.
- On first execution of SP instruction the current version of metadata for tables used by SP statement is extracted from the data dictionary and remembered in SP instruction's context.
- Next time the same SP instruction is run the current version of underlying tables metadata is checked against their version loaded from data dictionary. In case these versions are different the statement for this SP instruction is re-parsed and actual metadata of underlying tables is reloaded from the data dictionary.
To invalidate current SP instruction on metadata change and force its re-parsing, the same approach that used for Prepared Statement is applied - an instance of the class Reprepare_observer installed before second and subsequent executions of SP instruction and in case underlying tables metadata be changed this fact will be notified to and SP instruction's statement be re-parsed.
Attachments
Issue Links
- blocks
-
MDEV-11225 SELECT from view, which was replaced in prepared statement inside cursor, gives wrong result
- Stalled
-
MDEV-11652 SP with cursors does not work well in combination with ALTER TABLE
- Closed
-
MDEV-14557 Assertion `m_sp == __null' failed in Item_func_sp::init_result_field upon 2nd execution of SP
- Stalled
- causes
-
MDEV-31799 Unexpected ER_TRG_NO_SUCH_ROW_IN_TRG and server crash after ALTER TABLE
- Closed
-
MDEV-31867 Assertion `is_invalidated()' failed in Reprepare_observer::can_retry on 2nd execute of SP after recreation
- Open
-
MDEV-32694 ASAN errors in Binary_string::alloced_length / reset_stmt_params
- Open
- includes
-
MDEV-774 LP:948583 - Stored procedure doesn't not take into account ALTER TABLE, causes wrong result or replication abort
- Closed
-
MDEV-6488 Autodiscover + CONNECT + OR REPLACE
- Closed
- is blocked by
-
MDEV-19637 Crash on an SP variable assignment to a wrong subselect
- Closed
-
MDEV-19639 sql_mode=ORACLE: Wrong SHOW PROCEDURE output for sysvar:=expr
- Closed
-
MDEV-19640 Wrong SHOW PROCEDURE output for SET GLOBAL sysvar1=expr, sysvar2=expr
- Closed
- is part of
-
MDEV-4784 merge test cases from 5.6
- Stalled
- relates to
-
MDEV-26048 Table 'test._test_new' doesn't exist when add trigger (use pt-osc)
- Stalled
-
MDEV-31081 Assertion `fixed()' failed in virtual double Item_func_hybrid_field_type::val_real()
- Open
-
MDEV-31123 Stored programs does not validate SQLs when using certain SQL modes
- Open
-
MDEV-31661 Assertion `thd->lex == sp_instr_lex' failed in LEX* sp_lex_instr::parse_expr(THD*, sp_head*, LEX*)
- Closed
-
MDEV-7410 Temporary table name conflict between sessions
- Closed
-
MDEV-12166 PROCEDURE using a SELECT from a temporary table does not work well
- Closed
-
MDEV-33525 Recreate/reuse temporary table
- Closed
-
MDEV-34438 The insert trigger does not work while performing pt-osc.
- Confirmed