[MDEV-8146] scripts/mysql_system_tables_fix.sql to use alter table add/drop.. if exists/if not exists Created: 2015-05-12  Updated: 2023-09-19

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

Type: Task Priority: Minor
Reporter: Daniel Black Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Papercut, beginner-friendly


 Description   

ALTER TABLE ADD key/column IF NOT EXIST and ALTER TABLE DROP key/column IF EXISTS have been around since 10.0.2

scripts/mysql_system_tables_fix.sql statements don't include the existence checks.

The upgrade script should use them to reduce the errors in the log file of sql_error_log-plugin and just generally using the features available of MariaDB server.



 Comments   
Comment by Sergei Golubchik [ 2020-12-01 ]

also you can try using a proper IF instead of prepare/execute tricks.

Comment by Daniel Black [ 2023-09-19 ]

and execute immediate instead of prepare/execute.

Generated at Thu Feb 08 07:24:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.