[MDEV-33142] Reimplement sql_command_flags Created: 2023-12-29  Updated: 2024-01-03

Status: Open
Project: MariaDB Server
Component/s: Parser
Fix Version/s: None

Type: Task Priority: Major
Reporter: Nikita Malyavin Assignee: Nikita Malyavin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

sql_command_flags array is used to determine the sql command's capadilities.

Now that the grammar has expanded, and even INSERT can make an update (with DUP_UPDATE), or UPDATE can delete (with FOR PORTION OF...) a single array is not a good fit anymore.

We should store flags in the thd and make a function for updating.

The best implementation would be

  • Create a Sql_command class hierarchy.
  • Add field command_flags
  • Add a virtual function for computing this field.
  • Add a virtual Sql_command::execute() function that will substitute a big switch inside mysql_execute_command.
  • Create this object right from the yacc parsing

Generated at Thu Feb 08 10:36:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.