MySQL Forums
Forum List  »  Partitioning

Re: Add new LIST partition based on passed id in stored proc?
Posted by: Michael Zatkovetsky
Date: September 09, 2020 03:39PM

Thank you for taking a look. I tried your suggestion but getting Error Code: 1564. This partition function is not allowed

Here's my procedure:

DELIMITER $$
USE `mydb`$$

CREATE PROCEDURE `util_partioning_partition_new`(IN p_client_id INT)
BEGIN
DECLARE partition_name varchar(25);
SELECT CONCAT('p', p_client_id) INTO partition_name;

PREPARE stmt1 FROM 'ALTER TABLE test ADD PARTITION (PARTITION partition_name VALUES IN (?));';
SET @nid = p_client_id;

EXECUTE stmt1 USING @nid;
DEALLOCATE PREPARE stmt1;

END$$

DELIMITER ;
;

-------------------------
Error Code: 1564. This partition function is not allowed

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Add new LIST partition based on passed id in stored proc?
546
September 09, 2020 03:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.