mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
2682a280c8
storage/innobase/handler/handler0alter.cc: for NEWDATE key_type says unsigned, thus col->prtype says unsigned, but field->flags says signed. Use the same flag for value retrieval that was used for value storage.
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
--source include/have_xtradb.inc
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
|
|
|
|
--echo # Checking variables
|
|
SHOW VARIABLES LIKE 'innodb_fake_changes';
|
|
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
|
|
SET innodb_fake_changes=1;
|
|
SHOW VARIABLES LIKE 'innodb_fake_changes';
|
|
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
|
|
SET innodb_fake_changes=default;
|
|
SHOW VARIABLES LIKE 'innodb_fake_changes';
|
|
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
|
|
|
|
--echo # Explicit COMMIT should fail when innodb_fake_changes is enabled
|
|
--echo # DML should be fine
|
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1);
|
|
SET autocommit=0;
|
|
SET innodb_fake_changes=1;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (2);
|
|
UPDATE t1 SET a=0;
|
|
DELETE FROM t1 LIMIT 1;
|
|
SELECT * FROM t1;
|
|
--error 1180
|
|
COMMIT;
|
|
SET innodb_fake_changes=default;
|
|
DROP TABLE t1;
|
|
|
|
--echo # DDL must result in error
|
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|
SET autocommit=0;
|
|
SET innodb_fake_changes=1;
|
|
BEGIN;
|
|
--error 1005
|
|
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
|
--error 1051
|
|
DROP TABLE t1;
|
|
--error 1180
|
|
TRUNCATE TABLE t1;
|
|
--error 1180
|
|
ALTER TABLE t1 ENGINE=MyISAM;
|
|
ROLLBACK;
|
|
SET innodb_fake_changes=default;
|
|
DROP TABLE t1;
|