2007-02-06 13:35:54 +01:00
|
|
|
--disable_warnings
|
|
|
|
DROP TABLE IF EXISTS test.t1;
|
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
eval SET NAMES $cset;
|
|
|
|
|
|
|
|
let $std_cset= 1;
|
|
|
|
|
|
|
|
if ($bin_cset)
|
|
|
|
{
|
|
|
|
eval CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET $cset) ENGINE=$engine_type CHARACTER SET $cset;
|
|
|
|
let $bin_cset= 0;
|
|
|
|
let $std_cset= 0;
|
|
|
|
}
|
|
|
|
if ($std_cset)
|
|
|
|
{
|
|
|
|
eval CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET $cset COLLATE $coll) ENGINE=$engine_type CHARACTER SET $cset COLLATE $coll;
|
|
|
|
}
|
|
|
|
|
2018-02-10 14:42:59 +02:00
|
|
|
--replace_column 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 11 # 12 # 13 # 14 # 16 # 17 # 18 # 19 #
|
2007-02-06 13:35:54 +01:00
|
|
|
SHOW TABLE STATUS LIKE 't1';
|
|
|
|
|
|
|
|
--disable_warnings
|
|
|
|
--disable_query_log
|
2015-03-13 16:51:36 +04:00
|
|
|
ALTER TABLE test.t1 ADD code VARCHAR(16) NOT NULL;
|
2007-02-06 13:35:54 +01:00
|
|
|
let $1= 221;
|
|
|
|
while ($1)
|
|
|
|
{
|
2017-02-08 15:28:00 -05:00
|
|
|
eval INSERT IGNORE INTO test.t1 VALUES(CHAR(254-$1), HEX(254-$1));
|
2007-02-06 13:35:54 +01:00
|
|
|
dec $1;
|
|
|
|
}
|
|
|
|
DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1;
|
2015-03-13 16:51:36 +04:00
|
|
|
DELETE FROM test.t1 WHERE a='?' AND code<>'3F';
|
2007-02-06 13:35:54 +01:00
|
|
|
--enable_query_log
|
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a);
|
|
|
|
|
|
|
|
--disable_warnings
|
|
|
|
DROP TABLE IF EXISTS test.t1;
|
|
|
|
--enable_warnings
|
|
|
|
|