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

MySQL数据库

开发平台:

Visual C++

  1. drop table if exists t1,t2,t7,t8,t9;
  2. drop database if exists mysqltest;
  3. create table t1 (a int not null auto_increment, b char(16) not null, primary key (a));
  4. create table t2 (a int not null auto_increment, b char(16) not null, primary key (a));
  5. insert into t1 (b) values ("test"),("test1"),("test2"),("test3");
  6. insert into t2 (b) select b from t1;
  7. insert into t1 (b) select b from t2;
  8. insert into t2 (b) select b from t1;
  9. insert into t1 (b) select b from t2;
  10. insert into t2 (b) select b from t1;
  11. insert into t1 (b) select b from t2;
  12. insert into t2 (b) select b from t1;
  13. insert into t1 (b) select b from t2;
  14. insert into t2 (b) select b from t1;
  15. insert into t1 (b) select b from t2;
  16. insert into t2 (b) select b from t1;
  17. insert into t1 (b) select b from t2;
  18. insert into t2 (b) select b from t1;
  19. insert into t1 (b) select b from t2;
  20. insert into t2 (b) select b from t1;
  21. insert into t1 (b) select b from t2;
  22. insert into t2 (b) select b from t1;
  23. insert into t1 (b) select b from t2;
  24. drop table t2;
  25. insert into t9 select * from t1;
  26. check table t9;
  27. Table Op Msg_type Msg_text
  28. test.t9 check status OK
  29. optimize table t9;
  30. Table Op Msg_type Msg_text
  31. test.t9 optimize status OK
  32. repair table t9;
  33. Table Op Msg_type Msg_text
  34. test.t9 repair status OK
  35. alter table t9 add column c int not null;
  36. show create table t9;
  37. Table Create Table
  38. t9 CREATE TABLE `t9` (
  39.   `a` int(11) NOT NULL auto_increment,
  40.   `b` char(16) NOT NULL default '',
  41.   `c` int(11) NOT NULL default '0',
  42.   PRIMARY KEY  (`a`)
  43. ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
  44. alter table t9 rename t8, add column d int not null;
  45. alter table t8 rename t7;
  46. rename table t7 to t9;
  47. drop table t1;
  48. Got one of the listed errors
  49. Got one of the listed errors
  50. Got one of the listed errors
  51. Got one of the listed errors
  52. Got one of the listed errors
  53. alter table t9 rename mysqltest.t9;
  54. select count(*) from mysqltest.t9;
  55. count(*)
  56. 16724
  57. show create table mysqltest.t9;
  58. Table Create Table
  59. t9 CREATE TABLE `t9` (
  60.   `a` int(11) NOT NULL auto_increment,
  61.   `b` char(16) NOT NULL default '',
  62.   `c` int(11) NOT NULL default '0',
  63.   `d` int(11) NOT NULL default '0',
  64.   PRIMARY KEY  (`a`)
  65. ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
  66. drop database mysqltest;
  67. create table t1 (a int not null) engine=myisam;
  68. show create table t1;
  69. Table Create Table
  70. t1 CREATE TABLE `t1` (
  71.   `a` int(11) NOT NULL default '0'
  72. ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  73. alter table t1 add b int;
  74. show create table t1;
  75. Table Create Table
  76. t1 CREATE TABLE `t1` (
  77.   `a` int(11) NOT NULL default '0',
  78.   `b` int(11) default NULL
  79. ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  80. show create table t1;
  81. Table Create Table
  82. t1 CREATE TABLE `t1` (
  83.   `a` int(11) NOT NULL default '0',
  84.   `b` int(11) default NULL
  85. ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  86. drop table t1;
  87. show create table t1;
  88. Table Create Table
  89. t1 CREATE TABLE `t1` (
  90.   `i` int(11) default NULL
  91. ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  92. drop table t1;
  93. show create table t1;
  94. Table Create Table
  95. t1 CREATE TABLE `t1` (
  96.   `i` int(11) default NULL
  97. ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  98. drop table t1;