Files
percona-toolkit/t/pt-archiver/samples/pt-2114.sql
Sveta Smirnova 91ef89f904 PT-2114 Incorrect casting of bit columns by pt archiver (#587)
* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added special handling of BIT columns, because by default Perl does not properly recognizes
this type and creates invalid query for MySQL.
Removed debugging comment from t/pt-table-checksum/pt-226.t
Added test case.

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Removed debugging comments from t/pt-deadlock-logger/standard_options.t and t/pt-table-checksum/fnv_64.t

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added test for archiving BIT columns.

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added test for bulk operations

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added more tests for BIT columns

* PT-2114 Incorrect casting of BIT columns by pt-archiver

- Improved fix for PT-2123, so it works with 5.7
- Fixed tests for PT-2114, so they work with 5.7
2023-02-22 18:59:05 +03:00

20 lines
690 B
SQL

DROP DATABASE IF EXISTS pt_2114;
CREATE DATABASE pt_2114;
USE pt_2114;
CREATE TABLE `pt_2114`.`t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`val` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`id`,`val`)
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8mb4;
CREATE TABLE pt_2114.t1_tmp LIKE t1;
INSERT INTO pt_2114.t1 (val) VALUES (0),(1);
INSERT INTO pt_2114.t1 (val) SELECT val FROM pt_2114.t1 ;
INSERT INTO pt_2114.t1 (val) SELECT val FROM pt_2114.t1 ;
INSERT INTO pt_2114.t1_tmp SELECT NULL, val FROM pt_2114.t1;
CREATE TABLE `pt_2114`.`t2` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`val` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`id`,`val`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;