~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/alter_table.result

  • Committer: LinuxJedi
  • Date: 2010-08-12 23:56:35 UTC
  • mto: (1723.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 1724.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100812235635-0dd1nuryjb43k9nj
Migrate the rest of strerror to strerror_r

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
9
9
col6 int not null, to_be_deleted int);
10
10
insert into t1 values (2,4,3,5,"PENDING",1,7);
11
 
SELECT * FROM t1;
12
 
col1    col2    col3    col4    col5    col6    to_be_deleted
13
 
2       4       3       5       PENDING 1       7
14
11
alter table t1
15
12
add column col4_5 varchar(20) not null after col4,
16
13
add column col7 varchar(30) not null after col5,
17
14
add column col8 datetime not null default '1000-01-01 00:00:00', drop column to_be_deleted,
18
15
change column col2 fourth varchar(30) not null after col3,
19
16
modify column col6 int not null first;
20
 
ERROR HY000: Either a DEFAULt value or NULL NULL description is required for a new column if table is not empty
21
 
alter table t1
22
 
add column col4_5 varchar(20) DEFAULT "added" not null after col4,
23
 
add column col7 varchar(30) DEFAULT "added" not null after col5,
24
 
add column col8 datetime not null default '1000-01-01 00:00:00',
25
 
drop column to_be_deleted,
26
 
change column col2 fourth varchar(30) not null after col3,
27
 
modify column col6 int not null first;
28
17
select * from t1;
29
18
col6    col1    col3    fourth  col4    col4_5  col5    col7    col8
30
 
1       2       3       4       5       added   PENDING added   1000-01-01 00:00:00
 
19
1       2       3       4       5               PENDING         1000-01-01 00:00:00
31
20
drop table t1;
32
21
create table t1 (bandID INT NOT NULL PRIMARY KEY, payoutID int NOT NULL);
33
22
insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12);
187
176
alter table t2 rename t1, add c char(10) comment "no comment";
188
177
show columns from t1;
189
178
Field   Type    Null    Default Default_is_NULL On_Update
190
 
i       INTEGER NO              NO      
 
179
i       INTEGER NO      0       NO      
191
180
c       VARCHAR YES             YES     
192
181
drop table t1;
193
182
create table t1 (a int, b int);
364
353
SHOW CREATE TABLE t1;
365
354
Table   Create Table
366
355
t1      CREATE TABLE `t1` (
367
 
  `a` INT NOT NULL,
368
 
  `b` INT DEFAULT NULL,
 
356
  `a` int NOT NULL,
 
357
  `b` int DEFAULT NULL,
369
358
  UNIQUE KEY `b` (`b`)
370
 
) ENGINE=DEFAULT COLLATE = utf8_general_ci
 
359
) ENGINE=DEFAULT
371
360
ALTER TABLE t1 DROP PRIMARY KEY;
372
361
ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists
373
362
DROP TABLE t1;
527
516
use mysqltest;
528
517
drop database mysqltest;
529
518
alter table test.t1 rename t1;
530
 
ERROR 3D000: No schema selected
 
519
ERROR 3D000: No database selected
531
520
alter table test.t1 rename test.t1;
532
521
use test;
533
522
drop table t1;
536
525
SHOW CREATE TABLE t1;
537
526
Table   Create Table
538
527
t1      CREATE TABLE `t1` (
539
 
  `a` INT DEFAULT NULL,
 
528
  `a` int DEFAULT NULL,
540
529
  KEY `i1` (`a`)
541
 
) ENGINE=DEFAULT ROW_FORMAT='COMPACT' COLLATE = utf8_general_ci
 
530
) ENGINE=DEFAULT ROW_FORMAT='COMPACT'
542
531
DROP INDEX i1 ON t1;
543
532
SHOW CREATE TABLE t1;
544
533
Table   Create Table
545
534
t1      CREATE TABLE `t1` (
546
 
  `a` INT DEFAULT NULL
547
 
) ENGINE=DEFAULT ROW_FORMAT='COMPACT' COLLATE = utf8_general_ci
 
535
  `a` int DEFAULT NULL
 
536
) ENGINE=DEFAULT ROW_FORMAT='COMPACT'
548
537
DROP TABLE t1;
549
538
DROP TABLE IF EXISTS bug24219;
550
539
DROP TABLE IF EXISTS bug24219_2;
810
799
SHOW CREATE TABLE `tt+1`;
811
800
Table   Create Table
812
801
tt+1    CREATE TEMPORARY TABLE `tt+1` (
813
 
  `c1` INT DEFAULT NULL
814
 
) ENGINE=DEFAULT COLLATE = utf8_general_ci
 
802
  `c1` int DEFAULT NULL
 
803
) ENGINE=DEFAULT
815
804
SHOW CREATE TABLE `tt+2`;
816
805
Table   Create Table
817
806
tt+2    CREATE TEMPORARY TABLE `tt+2` (
818
 
  `c1` INT DEFAULT NULL
819
 
) ENGINE=DEFAULT COLLATE = utf8_general_ci
 
807
  `c1` int DEFAULT NULL
 
808
) ENGINE=DEFAULT
820
809
DROP TABLE   `tt+1`, `tt+2`;
821
810
CREATE TEMPORARY TABLE `#sql1` (c1 INT);
822
811
CREATE TEMPORARY TABLE `@0023sql2` (c1 INT);
835
824
SHOW CREATE TABLE `#sql2`;
836
825
Table   Create Table
837
826
#sql2   CREATE TEMPORARY TABLE `#sql2` (
838
 
  `c1` INT DEFAULT NULL
839
 
) ENGINE=DEFAULT COLLATE = utf8_general_ci
 
827
  `c1` int DEFAULT NULL
 
828
) ENGINE=DEFAULT
840
829
SHOW CREATE TABLE `@0023sql1`;
841
830
Table   Create Table
842
831
@0023sql1       CREATE TEMPORARY TABLE `@0023sql1` (
843
 
  `c1` INT DEFAULT NULL
844
 
) ENGINE=DEFAULT COLLATE = utf8_general_ci
 
832
  `c1` int DEFAULT NULL
 
833
) ENGINE=DEFAULT
845
834
DROP TABLE `#sql2`, `@0023sql1`;
846
835
DROP TABLE IF EXISTS t1;
847
836
DROP TABLE IF EXISTS t2;
861
850
"Non-copy data change - new frm, but old data and index files"
862
851
ALTER TABLE t1 CHANGE int_field unsigned_int_field INTEGER NOT NULL, RENAME t2;
863
852
SELECT * FROM t1 ORDER BY int_field;
864
 
ERROR 42S02: Unknown table 'test.t1'
 
853
ERROR 42S02: Table 'test.t1' doesn't exist
865
854
SELECT * FROM t2 ORDER BY unsigned_int_field;
866
855
unsigned_int_field      char_field
867
856
1       edno