| 5393 | */ |
| 5394 | |
| 5395 | bool 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 | |
| 5421 | bool select_create::store_values(List<Item> &values, bool *trg_skip_row) |
no test coverage detected