Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
4.2.0, 4.3.0beta1
-
None
Description
eZDbInterface::prepareSqlQuery() does not handle oracle triggers correctly.
How to reproduce the problem :
CREATE SEQUENCE s_xport_process_logs; CREATE OR REPLACE TRIGGER ezxport_customers_id_tr BEFORE INSERT ON ezxport_customers FOR EACH ROW WHEN ( new.id IS NULL ) BEGIN SELECT s_xport_customers.nextval INTO :new.id FROM dual; END; /
And now use the following code :
<?php $file = 'path/to/file'; $db = eZDB::instance( ); $db->insertFile( $file, 'schema.sql', false ); ?>
eZDbInterface sees the trigger as two strings :
string(197) "/ CREATE OR REPLACE TRIGGER ezxport_process_logs_id_tr BEFORE INSERT ON ezxport_process_logs FOR EACH ROW WHEN ( new.id IS NULL ) BEGIN SELECT s_xport_process_logs.nextval INTO :new.id FROM dual" string(3) "END"
Whereas it should be one string.