temp tables behaviour change: exception if exits on creation (like normal tables)

This commit is contained in:
stronk7
2009-09-09 09:41:37 +00:00
parent 3b7a763c18
commit f94f10ca81
2 changed files with 32 additions and 5 deletions
+3 -3
View File
@@ -485,7 +485,7 @@ class database_manager {
* This function will create the temporary table passed as argument with all its
* fields/keys/indexes/sequences, everything based in the XMLDB object
*
* If table already exists it will be dropped and recreated, please make sure
* If table already exists ddl_exception will be thrown, please make sure
* the table name does not collide with existing normal table!
*
* @param xmldb_table table object (full specs are required)
@@ -493,9 +493,9 @@ class database_manager {
*/
public function create_temp_table(xmldb_table $xmldb_table) {
/// Check table doesn't exist
// Check table doesn't exist
if ($this->table_exists($xmldb_table)) {
$this->drop_temp_table($xmldb_table);
throw new ddl_exception('ddltablealreadyexists', $xmldb_table->getName());
}
if (!$sqlarr = $this->generator->getCreateTempTableSQL($xmldb_table)) {