1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-11037 Diagnostics_area refactoring for user defined exceptions

Part 2:

Moving the part of Sql_condition that contain condition items
(such as m_class_origin, m_cursor_name, etc) into a separate
class Sql_condition_items. This allows to remove duplicate code in
different Sql_condition constructors.

Also, introducing new Sql_condition constructors and removing the method
Sql_condition::set(). All code sequences that called an Sql_condition
constructor followed by Sql_condition::set() are now replaced to
the new constructor calls. This gives light performance improvement,
as the relevant members are now initialized only one time.
This commit is contained in:
Alexander Barkov
2016-10-13 18:19:58 +04:00
parent 6010662cb3
commit 4d3818d30d
4 changed files with 135 additions and 126 deletions

View File

@ -427,8 +427,7 @@ bool Sql_cmd_resignal::execute(THD *thd)
DBUG_RETURN(result);
}
Sql_condition signaled_err(thd->mem_root);
signaled_err.set(signaled, signaled->message);
Sql_condition signaled_err(thd->mem_root, signaled, signaled->message);
if (m_cond)
{