mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
eb18f93a78
Previously we only stored the first given error (the error sent to the client) include/mysys_err.h: Moved ER_FILENOTFOUND last to avoid getting 'error 0' mysql-test/r/backup.result: More warnings from in case of errors mysql-test/r/innodb.result: More warnings from in case of errors mysql-test/r/key_cache.result: More warnings from in case of errors mysql-test/r/myisam.result: More warnings from in case of errors mysql-test/r/preload.result: More warnings from in case of errors mysql-test/r/repair.result: More warnings from in case of errors mysql-test/r/rpl_failed_optimize.result: More warnings from in case of errors mysql-test/r/subselect.result: More warnings from in case of errors mysql-test/t/backup.test: Portability fix mysql-test/t/innodb.test: Avoid some warnings mysql-test/t/myisam.test: Portability fix mysql-test/t/rpl_rotate_logs.test: Portablitiy fix mysys/errors.c: Move ER_FILENOTFOUND last to avoid error 0 sql/mysql_priv.h: Indentation change sql/mysqld.cc: Save all given errors for SHOW ERRORS sql/protocol.cc: Store new errors for SHOW ERROR (Ignore those that are already reported with my_error()) sql/sql_class.cc: More errors with SHOW ERROR sql/sql_class.h: More errors with SHOW ERROR sql/sql_error.cc: More errors with SHOW ERROR sql/sql_parse.cc: Temporary fix: Don't give error for the to-be-removed 'pre-open tables code' sql/sql_show.cc: More debugging Don't register errors while populating schema tables. (If we do, we get a LOT of warnings from information_schema.test) sql/sql_table.cc: Don't register errors from handler in drop table (as we already do it the upper level DROP TABLE code) Don't register errors for 'restore_table' as in most cases the table doesn't exists sql/sql_union.cc: Use file->write_row() instead of 'write_record'. This gives us easer to handle error messages and is faster than the old version
43 lines
1.5 KiB
Text
43 lines
1.5 KiB
Text
drop table if exists t1;
|
|
create table t1 SELECT 1,"table 1";
|
|
repair table t1 use_frm;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair warning Number of rows changed from 0 to 1
|
|
test.t1 repair status OK
|
|
alter table t1 ENGINE=HEAP;
|
|
repair table t1 use_frm;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair note The storage engine for the table doesn't support repair
|
|
drop table t1;
|
|
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st));
|
|
insert into t1 values(1, "One");
|
|
alter table t1 disable keys;
|
|
show keys from t1;
|
|
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
|
t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
|
|
t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
|
|
repair table t1 extended;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair status OK
|
|
show keys from t1;
|
|
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
|
t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
|
|
t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
|
|
drop table t1;
|
|
repair table t1 use_frm;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair error Table 'test.t1' doesn't exist
|
|
Warnings:
|
|
Error 1146 Table 'test.t1' doesn't exist
|
|
create table t1 engine=myisam SELECT 1,"table 1";
|
|
flush tables;
|
|
repair table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair error Incorrect file format 't1'
|
|
Warnings:
|
|
Error 130 Incorrect file format 't1'
|
|
repair table t1 use_frm;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair warning Number of rows changed from 0 to 1
|
|
test.t1 repair status OK
|
|
drop table t1;
|