summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-10-30 12:35:03 +0400
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-10-30 12:35:03 +0400
commite722393f519400c2f14999cbc669cafea648aa9e (patch)
tree2706c4c4b6b4d907d9501a6ef605079be702dc65 /mysql-test/t/func_str.test
parent31634a38e8639e487e75150567687c2982cbef58 (diff)
downloadmariadb-git-e722393f519400c2f14999cbc669cafea648aa9e.tar.gz
Bug #31758 inet_ntoa, oct crashes server with null+filesort
Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an argument, which is wrong. Both can be NULL with notnull arguments, so that's fixed. mysql-test/r/func_str.result: Bug #31758 inet_ntoa, oct crashes server with null+filesort test case mysql-test/t/func_str.test: Bug #31758 inet_ntoa, oct crashes server with null+filesort test result sql/item_strfunc.h: Bug #31758 inet_ntoa, oct crashes server with null+filesort missing maybe_null flags set for Item_func_inet_ntoa and Item_func_conv
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r--mysql-test/t/func_str.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 5897674d1d4..f2991cc3b1d 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -721,4 +721,17 @@ explain extended select encode(f1,'zxcv') as 'enc' from t1;
explain extended select decode(f1,'zxcv') as 'enc' from 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