Re: LOAD DATA INFILE ERROR 1172 (42000)
Posted by:
eric tse
Date: November 21, 2017 02:03PM
mysql> show triggers
-> ;
+-------------+--------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+------------------+----------------------+----------------------+--------------------+
| Trigger | Event | Table | Statement
| Timing | Created | sql_mode | Definer | character_set_client | collation_connection | Database Collation |
+-------------+--------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+------------------+----------------------+----------------------+--------------------+
| lbip_insert | INSERT | ServerIPs | BEGIN
DECLARE tmp_lbip VARCHAR(15);
DECLARE tmp_balance VARCHAR(25);
DECLARE tmp_n1keepalive VARCHAR(30);
DECLARE tmp_n1ip VARCHAR(15);
DECLARE tmp_n2ip VARCHAR(15);
DECLARE tmp_n2keepalive VARCHAR(30);
CASE
WHEN (NEW.server LIKE "%mallet%") OR (NEW.server LIKE "%cleek%") THEN
BEGIN
SET tmp_lbip = (SELECT DISTINCT lbip FROM CSSInfo WHERE ip=NEW.regip);
END;
ELSE
BEGIN
SELECT DISTINCT lbip,balance,n1ip,n1keepalive,n2ip,n2keepalive INTO tmp_lbip,tmp_balance,tmp_n1ip,tmp_n1keepalive,tmp_n2ip,tmp_n2keepalive
FROM LBInfo WHERE n1ip=NEW.regip OR n2ip=NEW.regip;
IF tmp_n1ip=NEW.regip THEN
SET NEW.keepalive = tmp_n1keepalive;
ELSE
SET NEW.keepalive = tmp_n2keepalive;
END IF;
SET NEW.balance = tmp_balance;
END;
END CASE;
SET NEW.lbip = tmp_lbip;
IF EXISTS(SELECT * FROM ListenIPs WHERE ip=NEW.regip) THEN
SET NEW.used = 'Y';
ELSE
SET NEW.used = 'N';
END IF;
END | BEFORE | NULL | | apache@localhost | latin1 | latin1_swedish_ci | latin1_swedish_ci |
+-------------+--------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+------------------+----------------------+----------------------+--------------------+
1 row in set (0.03 sec)
Subject
Written By
Posted
November 20, 2017 04:46PM
November 20, 2017 05:58PM
November 21, 2017 11:00AM
November 21, 2017 01:10PM
Re: LOAD DATA INFILE ERROR 1172 (42000)
November 21, 2017 02:03PM
November 21, 2017 02:15PM
November 27, 2017 09:12PM
November 21, 2017 02:04PM
November 21, 2017 03:37PM
November 21, 2017 04:07PM
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.