TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tbl_batch_list_after_del_tr AFTER DELETE ON tbl_batch_list FOR EACH ROW
\nBEGIN
\nIF (@DISABLE_TRIGGERS IS NULL) then
\nUPDATE tbl_batch_count SET ba_count=ba_count-1 WHERE ba_type_id=OLD.ba_list_type_id AND ba_type=OLD.ba_list_type;
\nEND IF;
\nEND' 'CREATE DEFINER=`root`@`localhost` TRIGGER tbl_batch_list_after_ins_tr AFTER INSERT ON tbl_batch_list FOR EACH ROW
\nBEGIN
\nIF (@DISABLE_TRIGGERS IS NULL) then
\nINSERT INTO tbl_batch_count SET
\nba_type_id=NEW.ba_list_type_id,ba_type=NEW.ba_list_type,ba_count=1
\nON DUPLICATE KEY UPDATE ba_count=ba_count+1;
\nEND IF;
\nEND' 'CREATE DEFINER=`root`@`localhost` TRIGGER tbl_batch_list_before_ins_tr BEFORE INSERT ON tbl_batch_list FOR EACH ROW
\nBEGIN
\nIF (@DISABLE_TRIGGERS IS NULL) then
\nIF ISNULL(NEW.ba_list_id) OR NEW.ba_list_id=0 THEN
\nSET NEW.ba_list_time = CURTIME();
\nEND IF;
\nIF (ISNULL(NEW.ba_list_xid) OR NEW.ba_list_xid=0) THEN
\nSET NEW.ba_list_xid=func_get_next_id(99);
\nEND IF;
\nEND IF;
\nEND'
sql_modes=1344274434 1344274434 1344274434
definers='root@localhost' 'root@localhost' 'root@localhost'
client_cs_names='cp1256' 'cp1256' 'cp1256'
connection_cl_names='cp1256_general_ci' 'cp1256_general_ci' 'cp1256_general_ci'
db_cl_names='cp1256_general_ci' 'cp1256_general_ci' 'cp1256_general_ci'
