1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Files
mariadb/sql
unknown 2e1bfbd2b4 Cleanup patch for handling of subselects in commands which cannot
handle them.

Problem:
CREATE|ALTER EVENT, HANDLER READ, KILL, Partitioning uses `expr` from the
parser. This rule comes with all the rings and bells including subqueries.
However, these commands are not subquery safe. For this reason there are two
fuse checks in the parser. They were checking by command id. CREATE EVENT
should forbid subquery is the fix for
bug#16394 Events: Crash if schedule contains SELECT
The fix has been incorporated as part of the patch for WL#3337 (Event scheduler
new architecture).

Solution:
A new flag was added to LEX command_forbids_subselect. The fuse checks were
changed. The commands are responsible to set the value to true whenever
they can't handle subselects.


sql/sql_lex.cc:
  initialize the variable
sql/sql_lex.h:
  Add a new flag whether the parser should allow a subselect when
  parsing. This is temporarily turned off by commands like CREATE|ALTER EVENT,
  HA_READ, KILL. Could be used by other parts which reuse `expr` rule of the
  grammar and should not allow subqueries as part of it.
sql/sql_yacc.yy:
  Forbid subselects in some commands in a better way.
  CREATE|ALTER EVENT, HANDLER READ, KILL, are not subselect
  safe for parameters and therefore they should be forbidden already in
  the parser.
  This patch makes it easier for the developer to add new commands in that
  sense similar to the mentioned above.
2006-08-23 16:53:04 +02:00
..
2006-05-30 10:22:31 +02:00
2006-08-17 18:13:45 +02:00
2006-06-18 14:56:35 +04:00
2006-07-14 02:07:37 +04:00
2006-07-13 17:34:49 +04:00
2006-06-19 12:45:34 +03:00
2006-08-17 18:13:45 +02:00
2006-08-17 18:13:45 +02:00
2006-08-17 18:13:45 +02:00
2006-06-12 06:50:11 -07:00
2006-06-28 14:22:14 +02:00
2006-06-12 06:50:11 -07:00
2006-05-04 22:27:12 +03:00
2006-08-17 18:13:45 +02:00
2006-07-19 08:57:52 +02:00