TYPE=TRIGGERS
triggers='CREATE TRIGGER `after_crecord_insert` AFTER INSERT ON `crecord` FOR EACH ROW begin
\ndeclare locktag integer default 0;
\n
\n   select count(*)  into locktag from zdts_variant
\n       where keyname = \'locked.customer\'  and keyvalue = \'yes\';
\n
\n   if (locktag = 0) then
\n      CALL  zproc_record(\'customer\',cast(new.cid as char(100)),0,current_timestamp,cast(new.owner as char(100)));
\n   end if;
\n
\nend' 'CREATE TRIGGER `after_crecord_update` AFTER UPDATE ON `crecord` FOR EACH ROW begin
\ndeclare locktag integer default 0;
\n
\n   select count(*)  into locktag from zdts_variant
\n       where keyname = \'locked.customer\'  and keyvalue = \'yes\';
\n
\n   if (locktag = 0) then
\n      CALL  zproc_record(\'customer\',cast(old.cid as char(100)),0,current_timestamp,cast(old.owner as char(100)));
\n   end if;
\n
\nend' 'CREATE TRIGGER `after_crecord_delete` AFTER DELETE ON `crecord` FOR EACH ROW begin
\ndeclare locktag integer default 0;
\n
\n   select count(*)  into locktag from zdts_variant
\n       where keyname = \'locked.customer\'  and keyvalue = \'yes\';
\n
\n   if (locktag = 0) then
\n      CALL  zproc_record(\'customer\',cast(old.cid as char(100)),0,current_timestamp,cast(old.owner as char(100)));
\n   end if;
\n
\nend'
sql_modes=0 0 0
definers='root@' 'root@' 'root@'
