~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
autoinc_int_field INT NOT NULL AUTO_INCREMENT
, null_int_field INT NULL
, not_null_bigint_field BIGINT NOT NULL
, null_bigint_field BIGINT NULL
, not_null_int_field INT NOT NULL
, null_varchar_field VARCHAR(100) NULL
, not_null_varchar_field VARCHAR(100) NOT NULL
, null_enum_field ENUM ('val1', 'val2') NULL
, not_null_enum_field ENUM ('val1', 'val2') NOT NULL
, null_date_field DATE NULL
, not_null_date_field DATE NOT NULL
, null_datetime_field DATETIME NULL
, not_null_datetime_field DATETIME NOT NULL
, null_blob_field BLOB NULL
, not_null_blob_field BLOB NOT NULL
, null_text_field TEXT NULL
, not_null_text_field TEXT NOT NULL
, null_timestamp_field TIMESTAMP NULL
, not_null_timestamp_field TIMESTAMP NOT NULL
, null_double_field DOUBLE NULL
, not_null_double_field DOUBLE NOT NULL
, null_decimal_field DECIMAL(10,2) NULL
, not_null_decimal_field DECIMAL(10,2) NOT NULL
, PRIMARY KEY (autoinc_int_field)
);
DROP TABLE t1;
CREATE TABLE t1 (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, key1 VARCHAR(10) NOT NULL
, key2 DOUBLE NOT NULL
, key3 BLOB NOT NULL
, UNIQUE KEY (key1)
, KEY named_key (key2)
, KEY partial_key (key3(30))
);
DROP TABLE t1;
START TRANSACTION;
DROP TABLE IF EXISTS `test`.`t1`;
COMMIT;
START TRANSACTION;
CREATE TABLE `test`.`t1` (   `autoinc_int_field` INT NOT NULL AUTO_INCREMENT,   `null_int_field` INT DEFAULT NULL,   `not_null_bigint_field` BIGINT NOT NULL,   `null_bigint_field` BIGINT DEFAULT NULL,   `not_null_int_field` INT NOT NULL,   `null_varchar_field` VARCHAR(100) COLLATE utf8_general_ci DEFAULT NULL,   `not_null_varchar_field` VARCHAR(100) COLLATE utf8_general_ci NOT NULL,   `null_enum_field` ENUM('val1','val2') DEFAULT NULL,   `not_null_enum_field` ENUM('val1','val2') NOT NULL,   `null_date_field` DATE DEFAULT NULL,   `not_null_date_field` DATE NOT NULL,   `null_datetime_field` DATETIME DEFAULT NULL,   `not_null_datetime_field` DATETIME NOT NULL,   `null_blob_field` BLOB,   `not_null_blob_field` BLOB NOT NULL,   `null_text_field` TEXT COLLATE utf8_general_ci,   `not_null_text_field` TEXT COLLATE utf8_general_ci NOT NULL,   `null_timestamp_field` TIMESTAMP NULL DEFAULT NULL,   `not_null_timestamp_field` TIMESTAMP NOT NULL,   `null_double_field` DOUBLE DEFAULT NULL,   `not_null_double_field` DOUBLE NOT NULL,   `null_decimal_field` DECIMAL(10,2) DEFAULT NULL,   `not_null_decimal_field` DECIMAL(10,2) NOT NULL,   PRIMARY KEY (`autoinc_int_field`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
COMMIT;
START TRANSACTION;
DROP TABLE `test`.`t1`;
COMMIT;
START TRANSACTION;
CREATE TABLE `test`.`t1` (   `id` INT NOT NULL AUTO_INCREMENT,   `key1` VARCHAR(10) COLLATE utf8_general_ci NOT NULL,   `key2` DOUBLE NOT NULL,   `key3` BLOB NOT NULL,   PRIMARY KEY (`id`),   UNIQUE KEY `key1` (`key1`),   KEY `named_key` (`key2`),   KEY `partial_key` (`key3`(30)) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
COMMIT;
START TRANSACTION;
DROP TABLE `test`.`t1`;
COMMIT;

Generating statements for innodb replication log
START TRANSACTION;
DROP TABLE IF EXISTS `test`.`t1`;
COMMIT;
START TRANSACTION;
CREATE TABLE `test`.`t1` (   `autoinc_int_field` INT NOT NULL AUTO_INCREMENT,   `null_int_field` INT DEFAULT NULL,   `not_null_bigint_field` BIGINT NOT NULL,   `null_bigint_field` BIGINT DEFAULT NULL,   `not_null_int_field` INT NOT NULL,   `null_varchar_field` VARCHAR(100) COLLATE utf8_general_ci DEFAULT NULL,   `not_null_varchar_field` VARCHAR(100) COLLATE utf8_general_ci NOT NULL,   `null_enum_field` ENUM('val1','val2') DEFAULT NULL,   `not_null_enum_field` ENUM('val1','val2') NOT NULL,   `null_date_field` DATE DEFAULT NULL,   `not_null_date_field` DATE NOT NULL,   `null_datetime_field` DATETIME DEFAULT NULL,   `not_null_datetime_field` DATETIME NOT NULL,   `null_blob_field` BLOB,   `not_null_blob_field` BLOB NOT NULL,   `null_text_field` TEXT COLLATE utf8_general_ci,   `not_null_text_field` TEXT COLLATE utf8_general_ci NOT NULL,   `null_timestamp_field` TIMESTAMP NULL DEFAULT NULL,   `not_null_timestamp_field` TIMESTAMP NOT NULL,   `null_double_field` DOUBLE DEFAULT NULL,   `not_null_double_field` DOUBLE NOT NULL,   `null_decimal_field` DECIMAL(10,2) DEFAULT NULL,   `not_null_decimal_field` DECIMAL(10,2) NOT NULL,   PRIMARY KEY (`autoinc_int_field`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
COMMIT;
START TRANSACTION;
DROP TABLE `test`.`t1`;
COMMIT;
START TRANSACTION;
CREATE TABLE `test`.`t1` (   `id` INT NOT NULL AUTO_INCREMENT,   `key1` VARCHAR(10) COLLATE utf8_general_ci NOT NULL,   `key2` DOUBLE NOT NULL,   `key3` BLOB NOT NULL,   PRIMARY KEY (`id`),   UNIQUE KEY `key1` (`key1`),   KEY `named_key` (`key2`),   KEY `partial_key` (`key3`(30)) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
COMMIT;
START TRANSACTION;
DROP TABLE `test`.`t1`;
COMMIT;
SET GLOBAL transaction_log_truncate_debug= true;