Commit 273bcb92 authored by unknown's avatar unknown

Merge 10.0-base to 10.0

parents 3e1ae7a0 e6c78988
...@@ -10,7 +10,7 @@ a ...@@ -10,7 +10,7 @@ a
2 2
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
SELECT a FROM t1; SELECT a FROM t1;
ERROR HY000: Got error -1 from storage engine ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine <STORAGE_ENGINE>
ALTER TABLE t1 IMPORT TABLESPACE; ALTER TABLE t1 IMPORT TABLESPACE;
SELECT a FROM t1; SELECT a FROM t1;
a a
......
...@@ -63,6 +63,7 @@ EOF ...@@ -63,6 +63,7 @@ EOF
--source alter_table.inc --source alter_table.inc
--let $error_codes = ER_GET_ERRNO --let $error_codes = ER_GET_ERRNO
--replace_result $storage_engine <STORAGE_ENGINE>
SELECT a FROM t1; SELECT a FROM t1;
--source check_errors.inc --source check_errors.inc
if ($mysql_errname != ER_GET_ERRNO) if ($mysql_errname != ER_GET_ERRNO)
......
...@@ -38,7 +38,7 @@ let $default_char_type = CHAR(8); ...@@ -38,7 +38,7 @@ let $default_char_type = CHAR(8);
if (!$ENGINE) if (!$ENGINE)
{ {
--skip ERROR: Storage engine under test is not defined, export ENGINE env variable or set it in define_engine.inc --skip Storage engine under test is not defined, export ENGINE env variable or set it in define_engine.inc
} }
# Check that the storage engine is loaded. Here we don't need to worry about the case, # Check that the storage engine is loaded. Here we don't need to worry about the case,
......
...@@ -42,6 +42,8 @@ db User NULL NULL ...@@ -42,6 +42,8 @@ db User NULL NULL
event db NULL NULL event db NULL NULL
event name NULL NULL event name NULL NULL
func name NULL NULL func name NULL NULL
gtid_slave_pos domain_id NULL NULL
gtid_slave_pos sub_id NULL NULL
help_category help_category_id NULL NULL help_category help_category_id NULL NULL
help_category name NULL NULL help_category name NULL NULL
help_keyword help_keyword_id NULL NULL help_keyword help_keyword_id NULL NULL
...@@ -70,6 +72,9 @@ proxies_priv Host NULL NULL ...@@ -70,6 +72,9 @@ proxies_priv Host NULL NULL
proxies_priv Proxied_host NULL NULL proxies_priv Proxied_host NULL NULL
proxies_priv Proxied_user NULL NULL proxies_priv Proxied_user NULL NULL
proxies_priv User NULL NULL proxies_priv User NULL NULL
roles_mapping Host NULL NULL
roles_mapping Role NULL NULL
roles_mapping User NULL NULL
servers Server_name NULL NULL servers Server_name NULL NULL
table_stats db_name NULL NULL table_stats db_name NULL NULL
table_stats table_name NULL NULL table_stats table_name NULL NULL
......
let $storage_engine_search_string = ENGINE=$storage_engine; let $storage_engine_search_string = ENGINE=$storage_engine;
--replace_result ' ' ' ' ' ,' ',' ' )' ')' '( ' '(' $default_tbl_opts <CUSTOM_TABLE_OPTIONS> $int_indexed_col <INT_COLUMN> $char_indexed_col <CHAR_COLUMN> $int_col <INT_COLUMN> $char_col <CHAR_COLUMN> $default_col_indexed_opts <CUSTOM_COL_OPTIONS> $default_col_opts <CUSTOM_COL_OPTIONS> $storage_engine_search_string ENGINE=<STORAGE_ENGINE> $default_index <CUSTOM_INDEX> --replace_result ' ' ' ' ' ,' ',' ' )' ')' '( ' '(' $default_tbl_opts <CUSTOM_TABLE_OPTIONS> $int_indexed_col <INT_COLUMN> $char_indexed_col <CHAR_COLUMN> $int_col <INT_COLUMN> $char_col <CHAR_COLUMN> $default_col_indexed_opts <CUSTOM_COL_OPTIONS> $default_col_opts <CUSTOM_COL_OPTIONS> $storage_engine_search_string ENGINE=<STORAGE_ENGINE> $storage_engine <STORAGE_ENGINE> $default_index <CUSTOM_INDEX>
...@@ -74,7 +74,6 @@ ERROR HY000: Failed to read from the .par file ...@@ -74,7 +74,6 @@ ERROR HY000: Failed to read from the .par file
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check Error Failed to read from the .par file test.t1 check Error Failed to read from the .par file
test.t1 check Error Incorrect information in file: './test/t1.frm'
test.t1 check error Corrupt test.t1 check error Corrupt
SELECT a,b FROM t1; SELECT a,b FROM t1;
ERROR HY000: Failed to read from the .par file ERROR HY000: Failed to read from the .par file
...@@ -83,7 +82,6 @@ ERROR HY000: Failed to read from the .par file ...@@ -83,7 +82,6 @@ ERROR HY000: Failed to read from the .par file
REPAIR TABLE t1; REPAIR TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 repair Error Failed to read from the .par file test.t1 repair Error Failed to read from the .par file
test.t1 repair Error Incorrect information in file: './test/t1.frm'
test.t1 repair error Corrupt test.t1 repair error Corrupt
DROP TABLE t1, t2; DROP TABLE t1, t2;
call mtr.add_suppression("Got an error from thread_id=.*"); call mtr.add_suppression("Got an error from thread_id=.*");
......
...@@ -358,7 +358,6 @@ static void clear_all_errors(THD *thd, Relay_log_info *rli) ...@@ -358,7 +358,6 @@ static void clear_all_errors(THD *thd, Relay_log_info *rli)
{ {
thd->is_slave_error = 0; thd->is_slave_error = 0;
thd->clear_error(); thd->clear_error();
rli->clear_error();
} }
inline int idempotent_error_code(int err_code) inline int idempotent_error_code(int err_code)
......
...@@ -120,6 +120,64 @@ sql_worker_killed(THD *thd, rpl_group_info *rgi, bool in_event_group) ...@@ -120,6 +120,64 @@ sql_worker_killed(THD *thd, rpl_group_info *rgi, bool in_event_group)
} }
static void
finish_event_group(THD *thd, int err, uint64 sub_id,
rpl_parallel_entry *entry, wait_for_commit *wfc)
{
/*
Remove any left-over registration to wait for a prior commit to
complete. Normally, such wait would already have been removed at
this point by wait_for_prior_commit() called from within COMMIT
processing. However, in case of MyISAM and no binlog, we might not
have any commit processing, and so we need to do the wait here,
before waking up any subsequent commits, to preserve correct
order of event execution. Also, in the error case we might have
skipped waiting and thus need to remove it explicitly.
It is important in the non-error case to do a wait, not just an
unregister. Because we might be last in a group-commit that is
replicated in parallel, and the following event will then wait
for us to complete and rely on this also ensuring that any other
event in the group has completed.
But in the error case, we have to abort anyway, and it seems best
to just complete as quickly as possible with unregister. Anyone
waiting for us will in any case receive the error back from their
wait_for_prior_commit() call.
*/
if (err)
wfc->unregister_wait_for_prior_commit();
else
wfc->wait_for_prior_commit();
thd->wait_for_commit_ptr= NULL;
/*
Record that this event group has finished (eg. transaction is
committed, if transactional), so other event groups will no longer
attempt to wait for us to commit. Once we have increased
entry->last_committed_sub_id, no other threads will execute
register_wait_for_prior_commit() against us. Thus, by doing one
extra (usually redundant) wakeup_subsequent_commits() we can ensure
that no register_wait_for_prior_commit() can ever happen without a
subsequent wakeup_subsequent_commits() to wake it up.
We can race here with the next transactions, but that is fine, as
long as we check that we do not decrease last_committed_sub_id. If
this commit is done, then any prior commits will also have been
done and also no longer need waiting for.
*/
mysql_mutex_lock(&entry->LOCK_parallel_entry);
if (entry->last_committed_sub_id < sub_id)
{
entry->last_committed_sub_id= sub_id;
mysql_cond_broadcast(&entry->COND_parallel_entry);
}
mysql_mutex_unlock(&entry->LOCK_parallel_entry);
wfc->wakeup_subsequent_commits(err);
}
pthread_handler_t pthread_handler_t
handle_rpl_parallel_thread(void *arg) handle_rpl_parallel_thread(void *arg)
{ {
...@@ -128,6 +186,7 @@ handle_rpl_parallel_thread(void *arg) ...@@ -128,6 +186,7 @@ handle_rpl_parallel_thread(void *arg)
struct rpl_parallel_thread::queued_event *events; struct rpl_parallel_thread::queued_event *events;
bool group_standalone= true; bool group_standalone= true;
bool in_event_group= false; bool in_event_group= false;
rpl_group_info *group_rgi= NULL;
uint64 event_gtid_sub_id= 0; uint64 event_gtid_sub_id= 0;
int err; int err;
...@@ -173,7 +232,8 @@ handle_rpl_parallel_thread(void *arg) ...@@ -173,7 +232,8 @@ handle_rpl_parallel_thread(void *arg)
thd->ENTER_COND(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread, thd->ENTER_COND(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread,
&stage_waiting_for_work_from_sql_thread, &old_stage); &stage_waiting_for_work_from_sql_thread, &old_stage);
while (!(events= rpt->event_queue) && !rpt->stop && !thd->killed) while (!(events= rpt->event_queue) && !rpt->stop && !thd->killed &&
!(rpt->current_entry && rpt->current_entry->force_abort))
mysql_cond_wait(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread); mysql_cond_wait(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread);
rpt->dequeue(events); rpt->dequeue(events);
thd->EXIT_COND(&old_stage); thd->EXIT_COND(&old_stage);
...@@ -199,6 +259,7 @@ handle_rpl_parallel_thread(void *arg) ...@@ -199,6 +259,7 @@ handle_rpl_parallel_thread(void *arg)
} }
err= 0; err= 0;
group_rgi= rgi;
/* Handle a new event group, which will be initiated by a GTID event. */ /* Handle a new event group, which will be initiated by a GTID event. */
if ((event_type= events->ev->get_type_code()) == GTID_EVENT) if ((event_type= events->ev->get_type_code()) == GTID_EVENT)
{ {
...@@ -294,41 +355,10 @@ handle_rpl_parallel_thread(void *arg) ...@@ -294,41 +355,10 @@ handle_rpl_parallel_thread(void *arg)
if (end_of_group) if (end_of_group)
{ {
in_event_group= false; in_event_group= false;
finish_event_group(thd, err, event_gtid_sub_id, entry,
/* &rgi->commit_orderer);
Remove any left-over registration to wait for a prior commit to
complete. Normally, such wait would already have been removed at
this point by wait_for_prior_commit(), but eg. in error case we
might have skipped waiting, so we would need to remove it explicitly.
*/
rgi->commit_orderer.unregister_wait_for_prior_commit();
thd->wait_for_commit_ptr= NULL;
/*
Record that this event group has finished (eg. transaction is
committed, if transactional), so other event groups will no longer
attempt to wait for us to commit. Once we have increased
entry->last_committed_sub_id, no other threads will execute
register_wait_for_prior_commit() against us. Thus, by doing one
extra (usually redundant) wakeup_subsequent_commits() we can ensure
that no register_wait_for_prior_commit() can ever happen without a
subsequent wakeup_subsequent_commits() to wake it up.
We can race here with the next transactions, but that is fine, as
long as we check that we do not decrease last_committed_sub_id. If
this commit is done, then any prior commits will also have been
done and also no longer need waiting for.
*/
mysql_mutex_lock(&entry->LOCK_parallel_entry);
if (entry->last_committed_sub_id < event_gtid_sub_id)
{
entry->last_committed_sub_id= event_gtid_sub_id;
mysql_cond_broadcast(&entry->COND_parallel_entry);
}
mysql_mutex_unlock(&entry->LOCK_parallel_entry);
rgi->commit_orderer.wakeup_subsequent_commits(err);
delete rgi; delete rgi;
group_rgi= rgi= NULL;
} }
events= next; events= next;
...@@ -348,6 +378,27 @@ handle_rpl_parallel_thread(void *arg) ...@@ -348,6 +378,27 @@ handle_rpl_parallel_thread(void *arg)
goto more_events; goto more_events;
} }
if (in_event_group && group_rgi->parallel_entry->force_abort)
{
/*
We are asked to abort, without getting the remaining events in the
current event group.
We have to rollback the current transaction and update the last
sub_id value so that SQL thread will know we are done with the
half-processed event group.
*/
mysql_mutex_unlock(&rpt->LOCK_rpl_thread);
group_rgi->is_error= true;
finish_event_group(thd, 1, group_rgi->gtid_sub_id,
group_rgi->parallel_entry, &group_rgi->commit_orderer);
group_rgi->cleanup_context(thd, true);
group_rgi->rli->abort_slave= true;
in_event_group= false;
delete group_rgi;
group_rgi= NULL;
mysql_mutex_lock(&rpt->LOCK_rpl_thread);
}
if (!in_event_group) if (!in_event_group)
{ {
rpt->current_entry= NULL; rpt->current_entry= NULL;
...@@ -645,6 +696,8 @@ rpl_parallel::find(uint32 domain_id) ...@@ -645,6 +696,8 @@ rpl_parallel::find(uint32 domain_id)
MY_MUTEX_INIT_FAST); MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_parallel_entry, &e->COND_parallel_entry, NULL); mysql_cond_init(key_COND_parallel_entry, &e->COND_parallel_entry, NULL);
} }
else
e->force_abort= false;
return e; return e;
} }
...@@ -656,6 +709,25 @@ rpl_parallel::wait_for_done() ...@@ -656,6 +709,25 @@ rpl_parallel::wait_for_done()
struct rpl_parallel_entry *e; struct rpl_parallel_entry *e;
uint32 i; uint32 i;
/*
First signal all workers that they must force quit; no more events will
be queued to complete any partial event groups executed.
*/
for (i= 0; i < domain_hash.records; ++i)
{
rpl_parallel_thread *rpt;
e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i);
e->force_abort= true;
if ((rpt= e->rpl_thread))
{
mysql_mutex_lock(&rpt->LOCK_rpl_thread);
if (rpt->current_entry == e)
mysql_cond_signal(&rpt->COND_rpl_thread);
mysql_mutex_unlock(&rpt->LOCK_rpl_thread);
}
}
for (i= 0; i < domain_hash.records; ++i) for (i= 0; i < domain_hash.records; ++i)
{ {
e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i); e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i);
...@@ -891,6 +963,7 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, ...@@ -891,6 +963,7 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
qev->future_event_master_log_pos= log_pos; qev->future_event_master_log_pos= log_pos;
if (!current) if (!current)
{ {
rli->event_relay_log_pos= rli->future_event_relay_log_pos;
handle_queued_pos_update(rli->sql_driver_thd, qev); handle_queued_pos_update(rli->sql_driver_thd, qev);
my_free(qev); my_free(qev);
return false; return false;
......
...@@ -76,6 +76,13 @@ struct rpl_parallel_entry { ...@@ -76,6 +76,13 @@ struct rpl_parallel_entry {
uint64 last_seq_no; uint64 last_seq_no;
uint64 last_commit_id; uint64 last_commit_id;
bool active; bool active;
/*
Set when SQL thread is shutting down, and no more events can be processed,
so worker threads must force abort any current transactions without
waiting for event groups to complete.
*/
bool force_abort;
rpl_parallel_thread *rpl_thread; rpl_parallel_thread *rpl_thread;
/* /*
The sub_id of the last transaction to commit within this domain_id. The sub_id of the last transaction to commit within this domain_id.
......
...@@ -688,8 +688,7 @@ public: ...@@ -688,8 +688,7 @@ public:
inline void inc_event_relay_log_pos() inline void inc_event_relay_log_pos()
{ {
if (!is_parallel_exec || if (!is_parallel_exec)
rli->event_relay_log_pos < future_event_relay_log_pos)
rli->event_relay_log_pos= future_event_relay_log_pos; rli->event_relay_log_pos= future_event_relay_log_pos;
} }
}; };
......
...@@ -6037,6 +6037,7 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) ...@@ -6037,6 +6037,7 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size)
The other case is much simpler: The other case is much simpler:
We just have a read only log that nobody else will be updating. We just have a read only log that nobody else will be updating.
*/ */
ulonglong old_pos;
bool hot_log; bool hot_log;
if ((hot_log = (cur_log != &rli->cache_buf))) if ((hot_log = (cur_log != &rli->cache_buf)))
{ {
...@@ -6088,12 +6089,12 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) ...@@ -6088,12 +6089,12 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size)
But if the relay log is created by new_file(): then the solution is: But if the relay log is created by new_file(): then the solution is:
MYSQL_BIN_LOG::open() will write the buffered description event. MYSQL_BIN_LOG::open() will write the buffered description event.
*/ */
old_pos= rli->event_relay_log_pos;
if ((ev= Log_event::read_log_event(cur_log,0, if ((ev= Log_event::read_log_event(cur_log,0,
rli->relay_log.description_event_for_exec, rli->relay_log.description_event_for_exec,
opt_slave_sql_verify_checksum))) opt_slave_sql_verify_checksum)))
{ {
ulonglong old_pos= rli->future_event_relay_log_pos;
/* /*
read it while we have a lock, to avoid a mutex lock in read it while we have a lock, to avoid a mutex lock in
inc_event_relay_log_pos() inc_event_relay_log_pos()
......
...@@ -6064,6 +6064,27 @@ wait_for_commit::wait_for_commit() ...@@ -6064,6 +6064,27 @@ wait_for_commit::wait_for_commit()
wait_for_commit::~wait_for_commit() wait_for_commit::~wait_for_commit()
{ {
/*
Since we do a dirty read of the waiting_for_commit flag in
wait_for_prior_commit() and in unregister_wait_for_prior_commit(), we need
to take extra care before freeing the wait_for_commit object.
It is possible for the waitee to be pre-empted inside wakeup(), just after
it has cleared the waiting_for_commit flag and before it has released the
LOCK_wait_commit mutex. And then it is possible for the waiter to find the
flag cleared in wait_for_prior_commit() and go finish up things and
de-allocate the LOCK_wait_commit and COND_wait_commit objects before the
waitee has time to be re-scheduled and finish unlocking the mutex and
signalling the condition. This would lead to the waitee accessing no
longer valid memory.
To prevent this, we do an extra lock/unlock of the mutex here before
deallocation; this makes certain that any waitee has completed wakeup()
first.
*/
mysql_mutex_lock(&LOCK_wait_commit);
mysql_mutex_unlock(&LOCK_wait_commit);
mysql_mutex_destroy(&LOCK_wait_commit); mysql_mutex_destroy(&LOCK_wait_commit);
mysql_cond_destroy(&COND_wait_commit); mysql_cond_destroy(&COND_wait_commit);
} }
...@@ -6087,8 +6108,13 @@ wait_for_commit::wakeup(int wakeup_error) ...@@ -6087,8 +6108,13 @@ wait_for_commit::wakeup(int wakeup_error)
mysql_mutex_lock(&LOCK_wait_commit); mysql_mutex_lock(&LOCK_wait_commit);
waiting_for_commit= false; waiting_for_commit= false;
this->wakeup_error= wakeup_error; this->wakeup_error= wakeup_error;
mysql_mutex_unlock(&LOCK_wait_commit); /*
Note that it is critical that the mysql_cond_signal() here is done while
still holding the mutex. As soon as we release the mutex, the waiter might
deallocate the condition object.
*/
mysql_cond_signal(&COND_wait_commit); mysql_cond_signal(&COND_wait_commit);
mysql_mutex_unlock(&LOCK_wait_commit);
} }
......
--- suite/storage_engine/alter_tablespace.result 2013-01-13 01:03:49.133994000 +0400
+++ suite/storage_engine/alter_tablespace.reject 2013-01-13 01:04:04.398937286 +0400
@@ -10,7 +10,7 @@
2
ALTER TABLE t1 DISCARD TABLESPACE;
SELECT * FROM t1;
-ERROR HY000: Got error -1 from storage engine
+ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT * FROM t1;
a
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
-v0 rating -v0 rating
-text1 178.11756896972656 -text1 178.11756896972656
-DROP TABLE t1; -DROP TABLE t1;
+ERROR HY000: The used table type doesn't support FULLTEXT indexes +ERROR HY000: The storage engine <STORAGE_ENGINE> doesn't support FULLTEXT indexes
+# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT.
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
-text1 190.56150817871094 -text1 190.56150817871094
-text4 1.1758291721343994 -text4 1.1758291721343994
-DROP TABLE t1; -DROP TABLE t1;
+ERROR HY000: The used table type doesn't support FULLTEXT indexes +ERROR HY000: The storage engine <STORAGE_ENGINE> doesn't support FULLTEXT indexes
+# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
t1 1 a 1 a # # NULL NULL YES BTREE t1 1 a 1 a # # NULL NULL YES BTREE
ALTER TABLE t1 DISABLE KEYS; ALTER TABLE t1 DISABLE KEYS;
+Warnings: +Warnings:
+Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine <STORAGE_ENGINE> of the table `test`.`t1` doesn't have this option
SHOW INDEX IN t1; SHOW INDEX IN t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-t1 1 a 1 a # # NULL NULL YES BTREE disabled -t1 1 a 1 a # # NULL NULL YES BTREE disabled
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
ALTER TABLE t1 ENABLE KEYS; ALTER TABLE t1 ENABLE KEYS;
+Warnings: +Warnings:
+Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine <STORAGE_ENGINE> of the table `test`.`t1` doesn't have this option
SHOW INDEX IN t1; SHOW INDEX IN t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 a 1 a # # NULL NULL YES BTREE t1 1 a 1 a # # NULL NULL YES BTREE
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
(21),(22),(23),(24),(25),(26),(27),(28),(29); (21),(22),(23),(24),(25),(26),(27),(28),(29);
ALTER TABLE t1 DISABLE KEYS; ALTER TABLE t1 DISABLE KEYS;
+Warnings: +Warnings:
+Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine <STORAGE_ENGINE> of the table `test`.`t1` doesn't have this option
INSERT INTO t1 (a) VALUES (29); INSERT INTO t1 (a) VALUES (29);
ERROR 23000: Duplicate entry '29' for key 'a' ERROR 23000: Duplicate entry '29' for key 'a'
# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). # Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY).
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> ROW_FORMAT=FIXED; CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> ROW_FORMAT=FIXED;
+Warnings: +Warnings:
+Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT. +Warning 140 <STORAGE_ENGINE>: assuming ROW_FORMAT=COMPACT.
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -698,7 +698,7 @@ ...@@ -698,7 +698,7 @@
-WHERE ST_Contains(ST_Buffer(bridges.position, 15.0), buildings.footprint) = 1; -WHERE ST_Contains(ST_Buffer(bridges.position, 15.0), buildings.footprint) = 1;
-count(*) -count(*)
-1 -1
+ERROR HY000: The used table type doesn't support SPATIAL indexes +ERROR HY000: The storage engine <STORAGE_ENGINE> doesn't support SPATIAL indexes
+# ERROR: Statement ended with errno 1464, errname ER_TABLE_CANT_HANDLE_SPKEYS (expected to succeed) +# ERROR: Statement ended with errno 1464, errname ER_TABLE_CANT_HANDLE_SPKEYS (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# [ CREATE TABLE gis_point (fid INT(11) /*!*/ /*Custom column options*/, g POINT NOT NULL, SPATIAL INDEX(g)) ENGINE=InnoDB /*!*/ /*Custom table options*/ ] +# [ CREATE TABLE gis_point (fid INT(11) /*!*/ /*Custom column options*/, g POINT NOT NULL, SPATIAL INDEX(g)) ENGINE=InnoDB /*!*/ /*Custom table options*/ ]
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
-3 4 -3 4
-4 5 -4 5
-DROP TABLE t1; -DROP TABLE t1;
+ERROR HY000: InnoDB storage engine does not support computed columns +ERROR HY000: <STORAGE_ENGINE> storage engine does not support computed columns
+# ERROR: Statement ended with errno 1910, errname ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS (expected to succeed) +# ERROR: Statement ended with errno 1910, errname ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b INT(11) /*!*/ /*Custom column options*/ GENERATED ALWAYS AS (a+1)) ENGINE=InnoDB /*!*/ /*Custom table options*/ ] +# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b INT(11) /*!*/ /*Custom column options*/ GENERATED ALWAYS AS (a+1)) ENGINE=InnoDB /*!*/ /*Custom table options*/ ]
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
-2 -2
-ALTER TABLE t1 DISCARD TABLESPACE; -ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT a FROM t1; -SELECT a FROM t1;
-ERROR HY000: Got error -1 from storage engine -ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine <STORAGE_ENGINE>
-ALTER TABLE t1 IMPORT TABLESPACE; -ALTER TABLE t1 IMPORT TABLESPACE;
-SELECT a FROM t1; -SELECT a FROM t1;
-a -a
-1 -1
-2 -2
+ERROR HY000: Table storage engine for 't1' doesn't have this option +ERROR HY000: Storage engine <STORAGE_ENGINE> of the table `test`.`t1` doesn't have this option
+# ERROR: Statement ended with errno 1031, errname ER_ILLEGAL_HA (expected to succeed) +# ERROR: Statement ended with errno 1031, errname ER_ILLEGAL_HA (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# [ ALTER TABLE t1 DISCARD TABLESPACE ] +# [ ALTER TABLE t1 DISCARD TABLESPACE ]
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
-2 -2
-ALTER TABLE t1 DISCARD TABLESPACE; -ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT a FROM t1; -SELECT a FROM t1;
-ERROR HY000: Got error -1 from storage engine -ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine <STORAGE_ENGINE>
-ALTER TABLE t1 IMPORT TABLESPACE; -ALTER TABLE t1 IMPORT TABLESPACE;
-SELECT a FROM t1; -SELECT a FROM t1;
-a -a
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
-v0 rating -v0 rating
-text1 178.11756896972656 -text1 178.11756896972656
-DROP TABLE t1; -DROP TABLE t1;
+ERROR HY000: The used table type doesn't support FULLTEXT indexes +ERROR HY000: The storage engine MRG_MyISAM doesn't support FULLTEXT indexes
+# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT.
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
-text1 190.56150817871094 -text1 190.56150817871094
-text4 1.1758291721343994 -text4 1.1758291721343994
-DROP TABLE t1; -DROP TABLE t1;
+ERROR HY000: The used table type doesn't support FULLTEXT indexes +ERROR HY000: The storage engine MRG_MyISAM doesn't support FULLTEXT indexes
+# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed) +# ERROR: Statement ended with errno 1214, errname ER_TABLE_CANT_HANDLE_FT (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# The statement|command finished with ER_TABLE_CANT_HANDLE_FT. +# The statement|command finished with ER_TABLE_CANT_HANDLE_FT.
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
-foobar 1000 -foobar 1000
-HANDLER t1 CLOSE; -HANDLER t1 CLOSE;
-ERROR 42S02: Unknown table 't1' in HANDLER -ERROR 42S02: Unknown table 't1' in HANDLER
+ERROR HY000: Table storage engine for 'h1' doesn't have this option +ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# The statement|command finished with ER_ILLEGAL_HA. +# The statement|command finished with ER_ILLEGAL_HA.
+# Functionality or the syntax or the mix could be unsupported. +# Functionality or the syntax or the mix could be unsupported.
...@@ -84,5 +84,5 @@ ...@@ -84,5 +84,5 @@
-a b -a b
-200 b -200 b
-HANDLER h1 CLOSE; -HANDLER h1 CLOSE;
+ERROR HY000: Table storage engine for 'h1' doesn't have this option +ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option
DROP TABLE t1; DROP TABLE t1;
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
t1 1 a 1 a # # NULL NULL YES BTREE t1 1 a 1 a # # NULL NULL YES BTREE
ALTER TABLE t1 DISABLE KEYS; ALTER TABLE t1 DISABLE KEYS;
+Warnings: +Warnings:
+Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option
SHOW INDEX IN t1; SHOW INDEX IN t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-t1 1 a 1 a # # NULL NULL YES BTREE disabled -t1 1 a 1 a # # NULL NULL YES BTREE disabled
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
(11),(12),(13),(14),(15),(16),(17),(18),(19),(20); (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
ALTER TABLE t1 ENABLE KEYS; ALTER TABLE t1 ENABLE KEYS;
+Warnings: +Warnings:
+Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option
SHOW INDEX IN t1; SHOW INDEX IN t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 a 1 a # # NULL NULL YES BTREE t1 1 a 1 a # # NULL NULL YES BTREE
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
(21),(22),(23),(24),(25),(26),(27),(28),(29); (21),(22),(23),(24),(25),(26),(27),(28),(29);
ALTER TABLE t1 DISABLE KEYS; ALTER TABLE t1 DISABLE KEYS;
+Warnings: +Warnings:
+Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option
INSERT INTO t1 (a) VALUES (29); INSERT INTO t1 (a) VALUES (29);
ERROR 23000: Duplicate entry '29' for key 'a' ERROR 23000: Duplicate entry '29' for key 'a'
# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). # Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY).
--- repair_table.result 2013-01-23 01:35:44.388267080 +0400 --- repair_table.result 2013-01-23 01:35:44.388267080 +0400
+++ repair_table.reject 2013-01-23 03:16:26.468307847 +0400 +++ repair_table.reject 2013-01-23 03:16:26.468307847 +0400
@@ -1,236 +1,114 @@ @@ -1,234 +1,114 @@
call mtr.add_suppression("Table '.*t1.*' is marked as crashed and should be repaired"); call mtr.add_suppression("Table '.*t1.*' is marked as crashed and should be repaired");
DROP TABLE IF EXISTS t1, t2; DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
...@@ -123,7 +123,6 @@ ...@@ -123,7 +123,6 @@
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
-test.t1 check Error Failed to read from the .par file -test.t1 check Error Failed to read from the .par file
-test.t1 check Error Incorrect information in file: './test/t1.frm'
-test.t1 check error Corrupt -test.t1 check error Corrupt
+test.t1 check Error Table 'test.t1' doesn't exist +test.t1 check Error Table 'test.t1' doesn't exist
+test.t1 check status Operation failed +test.t1 check status Operation failed
...@@ -136,7 +135,6 @@ ...@@ -136,7 +135,6 @@
REPAIR TABLE t1; REPAIR TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
-test.t1 repair Error Failed to read from the .par file -test.t1 repair Error Failed to read from the .par file
-test.t1 repair Error Incorrect information in file: './test/t1.frm'
-test.t1 repair error Corrupt -test.t1 repair error Corrupt
+test.t1 repair Error Table 'test.t1' doesn't exist +test.t1 repair Error Table 'test.t1' doesn't exist
+test.t1 repair status Operation failed +test.t1 repair status Operation failed
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
-HANDLER t1 OPEN AS h2; -HANDLER t1 OPEN AS h2;
-HANDLER h2 READ FIRST; -HANDLER h2 READ FIRST;
-a b -a b
+ERROR HY000: Table storage engine for 'h1' doesn't have this option +ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# The statement|command finished with ER_ILLEGAL_HA. +# The statement|command finished with ER_ILLEGAL_HA.
+# HANDLER or the syntax or the mix could be unsupported. +# HANDLER or the syntax or the mix could be unsupported.
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
-3 4 -3 4
-4 5 -4 5
-DROP TABLE t1; -DROP TABLE t1;
+ERROR HY000: MRG_MYISAM storage engine does not support computed columns +ERROR HY000: MRG_MyISAM storage engine does not support computed columns
+# ERROR: Statement ended with errno 1910, errname ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS (expected to succeed) +# ERROR: Statement ended with errno 1910, errname ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------ +# ------------ UNEXPECTED RESULT ------------
+# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b INT(11) /*!*/ /*Custom column options*/ GENERATED ALWAYS AS (a+1)) ENGINE=MRG_MYISAM /*!*/ /*Custom table options*/ UNION(mrg.t1) INSERT_METHOD=LAST ] +# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b INT(11) /*!*/ /*Custom column options*/ GENERATED ALWAYS AS (a+1)) ENGINE=MRG_MYISAM /*!*/ /*Custom table options*/ UNION(mrg.t1) INSERT_METHOD=LAST ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment