diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-23 16:30:06 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-23 16:30:06 +0400 |
commit | 1f57bfb8d1ed7f4cbe4a3410752903106cc8d34c (patch) | |
tree | 63d16cb4ade1aaafefad3d67afb0b06bf25bf078 /mysql-test/t | |
parent | 3f43b07b4ae78728c9bc6e608eb66ba2c35ce9a8 (diff) | |
download | mariadb-git-1f57bfb8d1ed7f4cbe4a3410752903106cc8d34c.tar.gz |
Fix for bug #32560: crash with interval function and count(*)
Problem: INTERVAL function implementation doesn't handle NULL range values.
Fix: skip NULL ranges looking for a proper one.
mysql-test/r/func_set.result:
Fix for bug #32560: crash with interval function and count(*)
- test result.
mysql-test/t/func_set.test:
Fix for bug #32560: crash with interval function and count(*)
- test case.
sql/item_cmpfunc.cc:
Fix for bug #32560: crash with interval function and count(*)
- skip NULL ranges calculating INTERVAL(...).
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/func_set.test | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test index 710b9b90a05..e4fde6e0e0e 100644 --- a/mysql-test/t/func_set.test +++ b/mysql-test/t/func_set.test @@ -54,4 +54,21 @@ select find_in_set(binary 'a', 'A,B,C'); # select find_in_set('1','3,1,'); -# End of 4.1 tests +--echo End of 4.1 tests + +# +# Bug #32560: crash with interval function and count(*) +# +SELECT INTERVAL(0.0, NULL); +SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL)); +SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL)); +SELECT INTERVAL(0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), + CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), + CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL)); +SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL), + CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL), + CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL), + CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL)); + +--echo End of 5.0 tests |