Skip to content
  • Erik Froseth's avatar
    e54f83dc
    Bug#28518485 CRASH WHEN USING JSON_TABLE IN A GENERATED COLUMN · e54f83dc
    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
    e54f83dc
    Bug#28518485 CRASH WHEN USING JSON_TABLE IN A GENERATED COLUMN
    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
Loading