[MDEV-25302] Attempt to set some system variables in PS mode results in issuing the error "ERROR 1615 (HY000): Prepared statement needs to be re-prepared" Created: 2021-03-30  Updated: 2021-06-21  Resolved: 2021-06-21

Status: Closed
Project: MariaDB Server
Component/s: Prepared Statements
Affects Version/s: 10.2.37, 10.3.28, 10.4.18, 10.5.9, 10.6
Fix Version/s: 10.6.2

Type: Bug Priority: Critical
Reporter: Dmitry Shulga Assignee: Dmitry Shulga
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-16708 Unsupported commands for prepared sta... Closed

 Description   

For example, in case mariadb server started with the option --skip-grant-tables, running of the statement "set global event_scheduler=1'" in PS mode results in issuing the error

ERROR 1615 (HY000): Prepared statement needs to be re-prepared

Test case is below:

MariaDB [test]> PREPARE stmt1 FROM 'set global event_scheduler=1';
Query OK, 0 rows affected (0,000 sec)
Statement prepared
 
MariaDB [test]> EXECUTE stmt1;
ERROR 1615 (HY000): Prepared statement needs to be re-prepared

The same error is issued in case the statement

SET GLOBAL gtid_slave_pos= ""

is executed in PS mode (no matter the option --skip-grant-tables specified or not)

 
Test case is below:
MariaDB [test]> PREPARE stmt1 FROM 'SET GLOBAL gtid_slave_pos= ""';
Query OK, 0 rows affected (0,000 sec)
Statement prepared
 
MariaDB [test]> EXECUTE stmt1;
ERROR 1615 (HY000): Prepared statement needs to be re-prepared



 Comments   
Comment by Oleksandr Byelkin [ 2021-04-13 ]

OK to push

Comment by Dmitry Shulga [ 2021-06-21 ]

This bug report resolved as part of the task MDEV-16708

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