merged from trunk: OCI8 ADODB - Fix imported from adodb 5.02 (Control

triggers and secuence names > 30 chars, oracle restriction)
This commit is contained in:
José Luis Gordo Romero 2007-09-30 03:12:36 +00:00
parent 7cbd5df48d
commit 8a5b43dda5

View File

@ -196,6 +196,14 @@ end;
$seqname = $this->seqPrefix.$tabname; $seqname = $this->seqPrefix.$tabname;
$trigname = $this->trigPrefix.$seqname; $trigname = $this->trigPrefix.$seqname;
} }
if (strlen($seqname) > 30) {
$seqname = $this->seqPrefix.uniqid('');
} // end if
if (strlen($trigname) > 30) {
$trigname = $this->trigPrefix.uniqid('');
} // end if
if (isset($tableoptions['REPLACE'])) $sql[] = "DROP SEQUENCE $seqname"; if (isset($tableoptions['REPLACE'])) $sql[] = "DROP SEQUENCE $seqname";
$seqCache = ''; $seqCache = '';
if (isset($tableoptions['SEQUENCE_CACHE'])){$seqCache = $tableoptions['SEQUENCE_CACHE'];} if (isset($tableoptions['SEQUENCE_CACHE'])){$seqCache = $tableoptions['SEQUENCE_CACHE'];}