1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
Both arguments of the function NAME_CONST must be constant expressions.
This constraint is checked in the Item_name_const::fix_fields method. 
Yet if the argument of the function was not a constant expression no
error message was reported. As a result the client hanged waiting for a
response.
Now the function Item_name_const::fix_fields reports an error message
when any of the additional context conditions imposed on the function
NAME_CONST is not satisfied.
This commit is contained in:
igor@olga.mysql.com
2007-12-07 23:36:58 -08:00
parent 987ec3f306
commit c04d3727dc
3 changed files with 25 additions and 7 deletions

View File

@@ -207,4 +207,9 @@ test
SELECT NAME_CONST('test', 'test');
test
test
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (5), (2);
SELECT NAME_CONST(x,2) FROM (SELECT a x FROM t1) t;
ERROR HY000: The 'NAME_CONST' syntax is reserved for purposes internal to the MySQL server
DROP TABLE t1;
End of 5.0 tests