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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
#
# Start of 10.4 tests
#
#
# MDEV-29481 mariadb-upgrade prints confusing statement
#
SET @debug_key_flags=TRUE;
CREATE PROCEDURE debug_show_key_flags()
BEGIN
IF @debug_key_flags IS TRUE
THEN
FLUSH TABLES;
-- Wrap SET into EXECUTE IMMEDIATE to avoid
-- parse time "Unknown system variable" errors in release builds.
EXECUTE IMMEDIATE "SET debug_dbug='+d,key'";
SELECT * FROM t1 LIMIT 0;
EXECUTE IMMEDIATE "SET debug_dbug=''";
END IF;
END;
$$
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d` double(18,7) DEFAULT NULL,
KEY `d` (`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
CHECK TABLE t1 FOR UPGRADE;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=INSTANT;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=NOCOPY;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
ALTER TABLE t1 FORCE;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000048 (HA_NULL_PART_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
DROP PROCEDURE debug_show_key_flags;
#
# End of 10.4 tests
#
|