PL/SQL parser (MDEV-10142)

[MDEV-11037] Diagnostics_area refactoring for user defined exceptions Created: 2016-10-12  Updated: 2020-08-27  Resolved: 2016-10-12

Status: Closed
Project: MariaDB Server
Component/s: OTHER, Parser
Affects Version/s: 10.3
Fix Version/s: 10.3.0

Type: Technical task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: Compatibility, refactoring

Issue Links:
Blocks
blocks MDEV-10587 sql_mode=ORACLE: User defined exceptions Closed
Sprint: 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

 Description   

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:

  • Sql_condition
  • Sql_condition_info

That will generate more duplicate code.
To avoid code duplication, we'll introduce the following class hierarchy:

Sql_state
  Sql_state_errno
    Diagnostics_area
    sp_condition_value
    Sql_state_errno_level
      Sql_condition_info
      Sql_condition   


Generated at Thu Feb 08 07:46:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.