mirror of
https://github.com/MariaDB/server.git
synced 2025-11-30 05:23:50 +03:00
* be strict in CREATE TABLE, just like in ALTER TABLE, because CREATE TABLE, just like ALTER TABLE, can be rolled back for any engine * but don't auto-convert warnings into errors for engine warnings (handler::create) - this matches ALTER TABLE behavior * and not when creating a default record, these errors are handled specially (and replaced with ER_INVALID_DEFAULT) * always issue a Note when a non-unique key is truncated, because it's not a Warning that can be converted to an Error. Before this commit it was a Note for blobs and a Warning for all other data types.
27 lines
873 B
Plaintext
27 lines
873 B
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
SET SQL_LOG_BIN=0;
|
|
CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
|
|
Warnings:
|
|
Note 1071 Specified key was too long; max key length is 1000 bytes
|
|
SET SQL_LOG_BIN=1;
|
|
connection slave;
|
|
SET @saved_slave_type_conversions= @@global.slave_type_conversions;
|
|
include/stop_slave.inc
|
|
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
|
|
include/start_slave.inc
|
|
SET SQL_LOG_BIN=0;
|
|
CREATE TABLE t1 ( c1 varchar(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
|
|
Warnings:
|
|
Note 1071 Specified key was too long; max key length is 1000 bytes
|
|
SET SQL_LOG_BIN=1;
|
|
connection master;
|
|
INSERT INTO t1(c1) VALUES ('insert into t1');
|
|
DROP TABLE t1;
|
|
connection slave;
|
|
SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions;
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
connection master;
|
|
include/rpl_end.inc
|