Currently members to store sqlstate, sql errno and sql condition level present in the following classes:
- Sql_condition (m_returned_sqlstate, m_sql_errno, m_level)
- Diagnostics_area (m_sql_errno, m_sqlstate)
- Sql_condition_info (sql_errno, sql_state, level)
- sp_condition_value (mysqlerr, sql_state)
This produces a lot of duplicate code.
For the purposes of
MDEV-10587 we'll also have to add a pointer to user defined exceptions at least in the following classes:
That will generate more duplicate code.
To avoid code duplication, we'll introduce the following class hierarchy: