[MDEV-9050] Allow variables in SEQUENCE table names Created: 2015-10-31  Updated: 2015-11-01  Resolved: 2015-10-31

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Sequence
Fix Version/s: N/A

Type: Task Priority: Minor
Reporter: Federico Razzoli Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-7332 sequence storage engine improvements Open

 Description   

SEQUENCE engine allows names like seq_1_to_10, but not seq_@a_to_@b.

This feature would make SEQUENCE more flexible - particularly in stored procedures.



 Comments   
Comment by Daniel Black [ 2015-10-31 ]

Its more a limitation as to where the variables are parsed.

In the meantime the following should work:

SET @sql := CONCAT('SELECT * FROM `seq_', @a, '_to_', @b,'`'); PREPARE mySt FROM @sql; EXECUTE mySt; DEALLOCATE PREPARE mySt;

Comment by Sergei Golubchik [ 2015-10-31 ]

See MDEV-7332

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