~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/alter_table.result

  • Committer: LinuxJedi
  • Date: 2010-08-30 16:24:46 UTC
  • mto: (1738.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1739.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100830162446-qdm7pnma8vp41e5m
Fix valgrind warnings (plus make exit clean up properly)

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);
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
359
) ENGINE=DEFAULT COLLATE = utf8_general_ci
371
360
ALTER TABLE t1 DROP PRIMARY KEY;
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
530
) ENGINE=DEFAULT ROW_FORMAT='COMPACT' COLLATE = utf8_general_ci
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
 
535
  `a` int DEFAULT NULL
547
536
) ENGINE=DEFAULT ROW_FORMAT='COMPACT' COLLATE = utf8_general_ci
548
537
DROP TABLE t1;
549
538
DROP TABLE IF EXISTS bug24219;
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
 
802
  `c1` int DEFAULT NULL
814
803
) ENGINE=DEFAULT COLLATE = utf8_general_ci
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
 
807
  `c1` int DEFAULT NULL
819
808
) ENGINE=DEFAULT COLLATE = utf8_general_ci
820
809
DROP TABLE   `tt+1`, `tt+2`;
821
810
CREATE TEMPORARY TABLE `#sql1` (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
 
827
  `c1` int DEFAULT NULL
839
828
) ENGINE=DEFAULT COLLATE = utf8_general_ci
840
829
SHOW CREATE TABLE `@0023sql1`;
841
830
Table   Create Table
842
831
@0023sql1       CREATE TEMPORARY TABLE `@0023sql1` (
843
 
  `c1` INT DEFAULT NULL
 
832
  `c1` int DEFAULT NULL
844
833
) ENGINE=DEFAULT COLLATE = utf8_general_ci
845
834
DROP TABLE `#sql2`, `@0023sql1`;
846
835
DROP TABLE IF EXISTS t1;