repair.result
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. drop table if exists t1;
  2. create table t1 SELECT 1,"table 1";
  3. repair table t1 use_frm;
  4. Table Op Msg_type Msg_text
  5. test.t1 repair warning Number of rows changed from 0 to 1
  6. test.t1 repair status OK
  7. alter table t1 ENGINE=HEAP;
  8. repair table t1 use_frm;
  9. Table Op Msg_type Msg_text
  10. test.t1 repair note The storage engine for the table doesn't support repair
  11. drop table t1;
  12. create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st));
  13. insert into t1 values(1, "One");
  14. alter table t1 disable keys;
  15. show keys from t1;
  16. Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
  17. t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
  18. t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
  19. repair table t1 extended;
  20. Table Op Msg_type Msg_text
  21. test.t1 repair status OK
  22. show keys from t1;
  23. Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
  24. t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
  25. t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
  26. drop table t1;
  27. repair table t1 use_frm;
  28. Table Op Msg_type Msg_text
  29. test.t1 repair error Table 'test.t1' doesn't exist
  30. create table t1 engine=myisam SELECT 1,"table 1";
  31. flush tables;
  32. repair table t1;
  33. Table Op Msg_type Msg_text
  34. test.t1 repair error Can't open file: 't1.MYI' (errno: 130)
  35. repair table t1 use_frm;
  36. Table Op Msg_type Msg_text
  37. test.t1 repair warning Number of rows changed from 0 to 1
  38. test.t1 repair status OK
  39. drop table t1;