MCPcopy Create free account
hub / github.com/MariaDB/server / binlog_drop_table

Function binlog_drop_table

sql/sql_insert.cc:5395–5418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5393*/
5394
5395bool binlog_drop_table(THD *thd, TABLE *table)
5396{
5397 StringBuffer<2048> query(system_charset_info);
5398 /* Don't log temporary tables if creation was not logged */
5399 if (!table->s->table_creation_was_logged)
5400 return 0;
5401 if (!thd->binlog_table_should_be_logged(&table->s->db))
5402 return 0;
5403
5404 query.append(STRING_WITH_LEN("DROP "));
5405 if (table->s->tmp_table)
5406 query.append(STRING_WITH_LEN("TEMPORARY "));
5407 query.append(STRING_WITH_LEN("TABLE IF EXISTS "));
5408 append_identifier(thd, &query, &table->s->db);
5409 query.append('.');
5410 append_identifier(thd, &query, &table->s->table_name);
5411
5412 return thd->binlog_query(THD::STMT_QUERY_TYPE,
5413 query.ptr(), query.length(),
5414 /* is_trans */ TRUE,
5415 /* direct */ FALSE,
5416 /* suppress_use */ TRUE,
5417 0) > 0;
5418}
5419
5420
5421bool select_create::store_values(List<Item> &values, bool *trg_skip_row)

Callers 1

mysql_alter_tableFunction · 0.85

Calls 6

binlog_queryMethod · 0.80
append_identifierFunction · 0.70
appendMethod · 0.45
ptrMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected