mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge
This commit is contained in:
@ -288,7 +288,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
for (table= tables; table; table= table->next_local)
|
||||
{
|
||||
char *db=table->db;
|
||||
table->was_dropped= 0;
|
||||
mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL);
|
||||
if (!close_temporary_table(thd, db, table->table_name))
|
||||
{
|
||||
@ -360,8 +359,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
wrong_tables.append(',');
|
||||
wrong_tables.append(String(table->table_name,system_charset_info));
|
||||
}
|
||||
else
|
||||
table->was_dropped= 1;
|
||||
}
|
||||
thd->tmp_table_used= tmp_table_deleted;
|
||||
error= 0;
|
||||
@ -2955,15 +2952,15 @@ mysql_discard_or_import_tablespace(THD *thd,
|
||||
err:
|
||||
close_thread_tables(thd);
|
||||
thd->tablespace_op=FALSE;
|
||||
|
||||
if (error == 0)
|
||||
{
|
||||
send_ok(thd);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
if (error == HA_ERR_ROW_IS_REFERENCED)
|
||||
my_error(ER_ROW_IS_REFERENCED, MYF(0));
|
||||
|
||||
table->file->print_error(error, MYF(0));
|
||||
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
@ -4905,9 +4902,16 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables, HA_CHECK_OPT *check_opt)
|
||||
protocol->store_null();
|
||||
else
|
||||
{
|
||||
while (!t->file->rnd_next(t->record[0]))
|
||||
for (;;)
|
||||
{
|
||||
ha_checksum row_crc= 0;
|
||||
int error= t->file->rnd_next(t->record[0]);
|
||||
if (unlikely(error))
|
||||
{
|
||||
if (error == HA_ERR_RECORD_DELETED)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (t->record[0] != (byte*) t->field[0]->ptr)
|
||||
row_crc= my_checksum(row_crc, t->record[0],
|
||||
((byte*) t->field[0]->ptr) - t->record[0]);
|
||||
|
Reference in New Issue
Block a user