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

Lots of small cleanups

- Simplified use_trans_cache() to return at once if is_transactional is set
- Indentation and spelling errors fixed
- Don't call signal_update() if update_binlog_end_pos() is called as the
  function already calls signal_update()
- Removed not used function wait_for_update_bin_log(), which would cause
  errors if ever used.
- Simplified handler::clone() by always allocating 'ref' in ha_open(). To do
  this I added an optional MEM_ROOT argument to ha_open() to be used when
  allocating 'ref'
- Changed arguments to get_system_var() from LEX_CSTRING to LEX_CSTRING*
- Added THD as argument to create_select_for_variable(). Changed also char*
  argument to LEX_CSTRING to avoid strlen() call.
- Change calls to append() to use LEX_CSTRING
This commit is contained in:
Michael Widenius
2017-06-19 06:34:38 +03:00
committed by Sergei Golubchik
parent a70f7aad55
commit 458d5ed8aa
33 changed files with 147 additions and 144 deletions

View File

@ -688,7 +688,7 @@ static void build_trig_stmt_query(THD *thd, TABLE_LIST *tables,
/* Create statement for storing trigger (without trigger order) */
if (lex->trg_chistics.ordering_clause == TRG_ORDER_NONE)
trigger_def->append(stmt_definition.str, stmt_definition.length);
trigger_def->append(&stmt_definition);
else
{
/* Copy data before FOLLOWS/PRECEDES trigger_name */
@ -923,8 +923,8 @@ err_without_cleanup:
if (trigger_dropped)
{
String drop_trg_query;
drop_trg_query.append("DROP TRIGGER /* generated by failed CREATE TRIGGER */ ");
drop_trg_query.append(lex->spname->m_name.str);
drop_trg_query.append(STRING_WITH_LEN("DROP TRIGGER /* generated by failed CREATE TRIGGER */ "));
drop_trg_query.append(&lex->spname->m_name);
/*
We dropped an existing trigger and was not able to recreate it because
of an internal error. Ensure it's also dropped on the slave.