mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Bug #30832: Assertion + crash with select name_const('test', now());
The NAME_CONST function is required to work correctly with constants only. When executed with functions that return types other than those returned by Item::field_type (string, int, decimal, or real), the result gets cast to one of those types. This cannot happen for constants. Fixed by only allowing constants as arguments to NAME_CONST. mysql-test/r/func_misc.result: Bug#30832: Test result mysql-test/t/func_misc.test: Bug#30832: Test case sql/item.h: Bug#30832: The fix
This commit is contained in:
parent
692b686dae
commit
582388e6d2
3 changed files with 32 additions and 0 deletions
|
|
@ -189,4 +189,18 @@ drop table table_26093;
|
|||
drop function func_26093_a;
|
||||
drop function func_26093_b;
|
||||
|
||||
#
|
||||
# Bug #30832: Assertion + crash with select name_const('test',now());
|
||||
#
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
SELECT NAME_CONST('test', NOW());
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
SELECT NAME_CONST('test', UPPER('test'));
|
||||
|
||||
SELECT NAME_CONST('test', NULL);
|
||||
SELECT NAME_CONST('test', 1);
|
||||
SELECT NAME_CONST('test', 1.0);
|
||||
SELECT NAME_CONST('test', 'test');
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue