mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#44358 valgrind errors with decode() function
The warning happens because string argument is not zero ended. The fix is to add new parameter 'length' to SQL_CRYPT() and use ptr() instead of c_ptr().
This commit is contained in:
@ -2526,3 +2526,17 @@ h i
|
||||
31.12.2008 AAAAAA, aaaaaa
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
drop table if exists t1;
|
||||
create table t1(f1 tinyint default null)engine=myisam;
|
||||
insert into t1 values (-1),(null);
|
||||
explain select 1 as a from t1,(select decode(f1,f1) as b from t1) a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using join buffer
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2
|
||||
explain select 1 as a from t1,(select encode(f1,f1) as b from t1) a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using join buffer
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user