[MCOL-1041] Stored procedure error on UPDATE query Created: 2017-11-20  Updated: 2019-07-10  Resolved: 2019-07-10

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 1.1.1
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: None

Epic Link: ColumnStore Compatibility Improvements

 Description   

The following stored procedure triggers an error:

DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_ADDTARGETChecK`()
BEGIN
   
declare vintcp varchar(100);
declare valias varchar(100);
declare intcpcount integer;
declare i int default 0;
set intcpcount = 0;
 select count(*) into intcpcount from mms_target_master_temp; 
    
  if(intcpcount >0) then
  while i<intcpcount do 
        
        select chld_intcp_value into vintcp from mms_target_master_temp LIMIT 1;
        select GEN_ALIAS into valias from  mms_target_master_temp where chld_intcp_value=vintcp LIMIT 1;
        
        set infinidb_vtable_mode=2;
        set sql_safe_updates=0;
        UPDATE MMS_CRI SET NOI_FLAG='HIGH', CLI_ALIAS=valias WHERE CALLING_IMEI=vintcp or CALLING_IMSI=vintcp or CALLINGPARTY=vintcp ;
        UPDATE MMS_CRI SET NOI_FLAG='HIGH',CLD_ALIAS=valias WHERE CALLED_IMEI=vintcp or CALLED_IMSI=vintcp  or CALLEDPARTY=vintcp;
        delete from mms_target_master_temp where chld_intcp_value=vintcp;
         set i=i+1;
     end while;
 end if;
END$$
DELIMITER ;

mms_target_master_temp is an InnoDB table, MMS_CRI is a ColumnStore table. The error triggered is:

Error Code: 1178. The storage engine for the table doesn't support This stored procedure syntax is not supported by Columnstore in this version

It does not error in InfiniDB. It appears to me that the update is trigging a rnd_init which errors because we are in an update.


Generated at Thu Feb 08 02:25:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.