List:General Discussion« Previous MessageNext Message »
From:°l||l°  Jinxed °l||l° Date:June 6 2005 9:15pm
Subject:LOAD DATA INFILE with INNODB
View as plain text  
hi, I have been pulling my hair for last couple of days.i want to put few sol statements
in TRANSACTION BLOCK. all the tables involved are of type innodb. the first SQL statement
in the block is LOAD DATA INFILE. inside the block ( using PHP ) i am checking for errors
and incase of error i want to rollback. but strangely when i tried to rollback it just
wouldn't do. i thought may be PHP is giving problems. then i did this

===========================================================
SET AUTOCOMMIT=0;
Query OK, 0 rows affected (0.00 sec)

select @@autocommit as autocommit;
+-----------------+
| autocommit |
+-----------------+
|          0       |
+-----------------+
1 row in set (0.00 sec)

LOAD DATA INFILE '1116560400.csv' INTO TABLE tbltemp FIELDS TERMINATED BY ',' LINES
TERMINATED BY '\r\n' (tmp_crdd_no,tmp_serial_no,tmp_date);
Query OK, 27265 rows affected (4.48 sec)
Records: 27265  Deleted: 0  Skipped: 0  Warnings: 0

rollback;
Query OK, 0 rows affected (0.00 sec)

===========================================================

when i looked in tbltemp i found out that the CSV file has been loaded although i rolled
back the transaction. i used insert statement and rolled back with no problem, so the
problem was narrowed down to LOAD DATA INFILE. i have read about LOAD DATA INFILE and
found nothing about this strange behavior. is there anything that i am missing out?

Regards
Haseeb Iqbal

	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail
http://uk.messenger.yahoo.com
Thread
LOAD DATA INFILE with INNODB°l||l°  Jinxed °l||l°6 Jun
  • Re: LOAD DATA INFILE with INNODBmfatene7 Jun
  • Re: LOAD DATA INFILE with INNODB°l||l°  Jinxed °l||l°7 Jun
    • Re: LOAD DATA INFILE with INNODBmfatene7 Jun
  • Re: LOAD DATA INFILE with INNODB°l||l°  Jinxed °l||l°7 Jun
  • Re: LOAD DATA INFILE with INNODB°l||l°  Jinxed °l||l°8 Jun
  • Re: LOAD DATA INFILE with INNODB°l||l°  Jinxed °l||l°8 Jun