-
Erik Froseth authored
If a user tried to create a table with a generated column where the generated column contained a JSON_TABLE, the server would end up trying to access a null-pointer. The server already rejects subqueries in generated column expression, but this check could be omitted if a subquery was a subpart of a more complex expression. The MySQL manual says that "Subqueries, parameters, variables, stored functions, and user-defined functions are not permitted.". This patch fixes the bug by making pre_validate_value_generator_expr() more aggressive so that expressions that contains either subqueries or stored functions (either at root level or inside the expression in any way) are rejected as generated column expressions. Change-Id: I86870e66bc3b6220197f3519c721a7385c0d4cb5
Erik Froseth authoredIf a user tried to create a table with a generated column where the generated column contained a JSON_TABLE, the server would end up trying to access a null-pointer. The server already rejects subqueries in generated column expression, but this check could be omitted if a subquery was a subpart of a more complex expression. The MySQL manual says that "Subqueries, parameters, variables, stored functions, and user-defined functions are not permitted.". This patch fixes the bug by making pre_validate_value_generator_expr() more aggressive so that expressions that contains either subqueries or stored functions (either at root level or inside the expression in any way) are rejected as generated column expressions. Change-Id: I86870e66bc3b6220197f3519c721a7385c0d4cb5
Loading