mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
bugfix: Item_func_weight_string::print()
This commit is contained in:
@ -119,7 +119,7 @@ SELECT * FROM t1 WHERE a=1 AND WEIGHT_STRING(a) IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 1) and isnull(weight_string(`test`.`t1`.`a`)))
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 1) and isnull(weight_string(`test`.`t1`.`a`,0,0,1)))
|
||||
ALTER TABLE t1 MODIFY a DOUBLE ZEROFILL;
|
||||
SELECT * FROM t1 WHERE a=1 AND WEIGHT_STRING(a) IS NULL;
|
||||
a
|
||||
@ -129,7 +129,7 @@ SELECT * FROM t1 WHERE a=1 AND WEIGHT_STRING(a) IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 1) and isnull(weight_string(`test`.`t1`.`a`)))
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 1) and isnull(weight_string(`test`.`t1`.`a`,0,0,1)))
|
||||
ALTER TABLE t1 MODIFY a DECIMAL(10,1) ZEROFILL;
|
||||
SELECT * FROM t1 WHERE a=1 AND WEIGHT_STRING(a) IS NULL;
|
||||
a
|
||||
@ -139,7 +139,7 @@ SELECT * FROM t1 WHERE a=1 AND WEIGHT_STRING(a) IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 1) and isnull(weight_string(`test`.`t1`.`a`)))
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 1) and isnull(weight_string(`test`.`t1`.`a`,0,0,1)))
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
@ -155,13 +155,18 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(10) DEFAULT NULL,
|
||||
`b` varbinary(10) DEFAULT WEIGHT_STRING(a AS CHAR(10))
|
||||
`b` varbinary(10) DEFAULT weight_string(`a`,0,10,65)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 (a) VALUES ('a');
|
||||
SELECT a, HEX(b) FROM t1;
|
||||
a HEX(b)
|
||||
a 41202020202020202020
|
||||
DROP TABLE t1;
|
||||
create view v1 as select weight_string("MySQL" as char(4));
|
||||
select * from v1;
|
||||
weight_string("MySQL" as char(4))
|
||||
MYSQ
|
||||
drop view v1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user