1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00
Files
mariadb/mysql-test/suite/innodb/r/1byte_data_int.result
Sergei Golubchik 6882f9fa67 MDEV-4024 Found Index PRIMARY whose column info does not match that of MySQL
For compatibility purposes let InnoDB use DATA_INT for MYSQL_TYPE_ENUM and MYSQL_TYPE_SET.
Silence the warning for these types and let the index translation table to be built anyway.

Test case by Jeremy Cole.
2013-10-31 23:20:05 +01:00

24 lines
520 B
Plaintext

# Create a table with a 1-byte ENUM, 1-byte SET, and TINYINT UNSIGNED.
CREATE TABLE t1
(
t1_enum ENUM("a", "b", "c"),
t1_set SET("a", "b", "c"),
t1_tinyint_s TINYINT,
t1_tinyint_u TINYINT UNSIGNED
) ENGINE=InnoDB;
# All t1 fields' mtypes should be 6 (DATA_INT).
SELECT
name,
mtype,
(prtype & 512) = 512 AS is_unsigned
FROM information_schema.INNODB_SYS_COLUMNS
WHERE name LIKE "t1\_%"
ORDER BY name;
name mtype is_unsigned
t1_enum 6 1
t1_set 6 1
t1_tinyint_s 6 0
t1_tinyint_u 6 1
# Cleanup
DROP TABLE t1;