mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge mysql.com:/home/hf/work/31758/my41-31758
into mysql.com:/home/hf/work/31758/my50-31758 mysql-test/t/func_str.test: Auto merged mysql-test/r/func_str.result: merging sql/item_strfunc.h: merging
This commit is contained in:
@ -1095,6 +1095,18 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
|
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select decode('','zxcv') AS `enc` from `test`.`t1`
|
Note 1003 select decode('','zxcv') AS `enc` from `test`.`t1`
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a bigint not null)engine=myisam;
|
||||||
|
insert into t1 set a = 1024*1024*1024*4;
|
||||||
|
delete from t1 order by (inet_ntoa(a)) desc limit 10;
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a char(36) not null)engine=myisam;
|
||||||
|
insert ignore into t1 set a = ' ';
|
||||||
|
insert ignore into t1 set a = ' ';
|
||||||
|
select * from t1 order by (oct(a));
|
||||||
|
a
|
||||||
|
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
End of 4.1 tests
|
End of 4.1 tests
|
||||||
create table t1 (d decimal default null);
|
create table t1 (d decimal default null);
|
||||||
|
@ -738,6 +738,19 @@ explain extended select encode(f1,'zxcv') as 'enc' from t1;
|
|||||||
explain extended select decode(f1,'zxcv') as 'enc' from t1;
|
explain extended select decode(f1,'zxcv') as 'enc' from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #31758 inet_ntoa, oct, crashes server with null + filesort
|
||||||
|
#
|
||||||
|
create table t1 (a bigint not null)engine=myisam;
|
||||||
|
insert into t1 set a = 1024*1024*1024*4;
|
||||||
|
delete from t1 order by (inet_ntoa(a)) desc limit 10;
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a char(36) not null)engine=myisam;
|
||||||
|
insert ignore into t1 set a = ' ';
|
||||||
|
insert ignore into t1 set a = ' ';
|
||||||
|
select * from t1 order by (oct(a));
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
--echo End of 4.1 tests
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -584,7 +584,8 @@ public:
|
|||||||
void fix_length_and_dec()
|
void fix_length_and_dec()
|
||||||
{
|
{
|
||||||
collation.set(default_charset());
|
collation.set(default_charset());
|
||||||
max_length= 64;
|
max_length=64;
|
||||||
|
maybe_null= 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -682,7 +683,7 @@ public:
|
|||||||
}
|
}
|
||||||
String* val_str(String* str);
|
String* val_str(String* str);
|
||||||
const char *func_name() const { return "inet_ntoa"; }
|
const char *func_name() const { return "inet_ntoa"; }
|
||||||
void fix_length_and_dec() { decimals = 0; max_length=3*8+7; }
|
void fix_length_and_dec() { decimals = 0; max_length=3*8+7; maybe_null=1;}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Item_func_quote :public Item_str_func
|
class Item_func_quote :public Item_str_func
|
||||||
|
Reference in New Issue
Block a user