Skip to content

Commit

Permalink
Modified generated SQL for triggers in install.php to work with Oracl…
Browse files Browse the repository at this point in the history
…e sqlplus

"CREATE OR REPLACE TRIGGER" statements must end with
	END;
	/
to work for Oracle sqlplus

Original patch provided by Carsten Grohmann in issue #13227

Porting to 1.3 - Conflicts:
	admin/install.php
  • Loading branch information
dregad committed Oct 16, 2013
1 parent 803446e commit f3df5f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion admin/install.php
Expand Up @@ -748,7 +748,13 @@ function InsertData( $p_table, $p_data ) {
if( $f_log_queries ) {
if( $t_sql ) {
foreach( $sqlarray as $sql ) {
echo htmlentities( $sql ) . ";\n\n";
# "CREATE OR REPLACE TRIGGER" statements must end with "END;\n/" for Oracle sqlplus
if ( $f_db_type == 'oci8' && stripos( $sql, 'CREATE OR REPLACE TRIGGER' ) === 0 ) {
$t_sql_end = "\n/";
} else {
$t_sql_end = ";";
}
echo htmlentities( $sql ) . $t_sql_end . "\n\n";
}
}
} else {
Expand Down

0 comments on commit f3df5f1

Please sign in to comment.