maria:bb-10.8-MDEV-5816

Last commit made on 2022-02-16
Get this branch:
git clone -b bb-10.8-MDEV-5816 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.8-MDEV-5816
Repository:
lp:maria

Recent commits

e5693d3... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

Added storing of sql expression for instruction being parsed inside
the classes derived from the class sp_lex_instr.

Stored sql expression is returned by the abstract method
  sp_lex_instr::get_expr_query
redefined in the derived classes.

The virtual method sp_lex_instr::get_query() has beens added to return
a parseable string for a statement that corresponds to the given
instruction.

e12d841... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

Added the file sp_instr.cc to a list of sources for building embedded mariadb.

e275385... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch converting the class sp_instr_opt_meta
to the base abstract class, that is not inhereted from the class sp_instr.

Every jump SP instruction now must be inhereted directly from
the class sp_instr_opt_meta and additionally from either the class
sp_lex_instr or sp_instr depending on whether this SP instruction
does need access to LEX object or not.

68bf13e... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch converting the class sp_instr_opt_meta
to the base abstract class, that is not inhereted from the class sp_instr.

Every jump SP instruction now must be inhereted directly from
the class sp_instr_opt_meta and additionally from either the class
sp_lex_instr or sp_inst depending on whether this SP instruction
does need access to LEX object or not.

3727785... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch introducing the class sp_lex_instr
that encapsulates access to an instance of sp_lex_keeper. Every SP instruction
that does need access to LEX object on its processing should inherit this class
and implement two abstract methods:
  is_invalid(),
  invalidate().
These method will be used in subsequent patches to implement recomplilation of
SP instructions on failure.
Currently, the following instructions are derived from the class sp_lex_instr:
  sp_instr_stmt,
  sp_instr_set,
  sp_instr_set_trigger_field,
  sp_instr_freturn,
  sp_instr_cursor_copy_struct.

45f1404... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch to change signature of the virtual
method opt_move() in the base class sp_instr and its derived classes.
The parameterized type of the instuctions list returned in the second
argument is changed from sp_instr to sp_instr_opt_meta since only
jump instructions are placed in this list on returning from
the method call.

024c7e9... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch to move the data member
LEX::trg_table_fields to sp_head::m_trg_table_fields.

This data memeber is used for handling OLD/NEW pseudo-rows inside
trigger body and in order to be able to reparse a trigger body
this must be moved from the struct LEX to the class sp_head.

d54f246... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch to remove the data member
sp_head::m_trg_table_fields and some methods that use it but is not called
anywhere in the source code.

The commit 5f1f2fc0e443f098af24d21f7d1ec1a8166a4030 introduced the
data member sp_head::m_trg_table_fields and the method
Table_triggers_list::is_fields_updated_in_trigger that used this data member.

The method Table_triggers_list::is_fields_updated_in_trigger() is invoked by
the method partition_info::can_prune_insert() also introduced by
the same commit 5f1f2fc0e443f098af24d21f7d1ec1a8166a4030

But the method partition_info::can_prune_insert() is not called anywhere
in the code. Later, the aforementioned methods were removed from
the source code but the data member sp_head::m_trg_table_fields wasn't.
So, remove the data member sp_head::m_trg_table_fields and declaration of
the method is_fields_updated_in_trigger() for purpose of code cleaning up.

1df2265... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch to move the sp_instr class and classes derived
from it into the files sp_instr.cc/sp_instr.h

Additionally,
  * all occurrences of macroses NULL, FALSE, TRUE have been replaced
    with the corresponding C++ keywords nullptr, false, true.
  * has been used the keyword override and removed the keyword virtual
    in signature of every virtual method implemented in classes derived
    from the base class sp_instr.
  * trivial destructors of the form
     virtual ~sp_instr_hpo() {}
    have been removed for every classes derived from the base class sp_instr
    since they are meaningless

9218ad1... by Dmitry Shulga <email address hidden>

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch to make interface of the class
Reprepare_observer more similar to the one used by MySQL.