SQLite: Handle error in altering table (bug #697)
This commit is contained in:
parent
788d383609
commit
1b33729110
|
@ -591,11 +591,10 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
|||
$trigger = trigger($trigger_name);
|
||||
$triggers[] = "CREATE TRIGGER " . idf_escape($trigger_name) . " " . implode(" ", $timing_event) . " ON " . table($name) . "\n$trigger[Statement]";
|
||||
}
|
||||
if (!queries("DROP TABLE " . table($table))) { // drop before creating indexes and triggers to allow using old names
|
||||
return false;
|
||||
}
|
||||
queries("ALTER TABLE " . table("adminer_$name") . " RENAME TO " . table($name));
|
||||
if (!alter_indexes($name, $indexes)) {
|
||||
if (!queries("DROP TABLE " . table($table)) // drop before creating indexes and triggers to allow using old names
|
||||
|| !queries("ALTER TABLE " . table("adminer_$name") . " RENAME TO " . table($name))
|
||||
|| !alter_indexes($name, $indexes)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
foreach ($triggers as $trigger) {
|
||||
|
|
|
@ -3,6 +3,7 @@ MySQL: Speed up displaying tables in large databases (bug #700)
|
|||
MySQL: Allow editing rows identified by negative floats (bug #695)
|
||||
MySQL: Skip editing generated columns
|
||||
SQLite: Quote strings stored in integer columns in export (bug #696)
|
||||
SQLite: Handle error in altering table (bug #697)
|
||||
|
||||
Adminer 4.7.2 (released 2019-07-18):
|
||||
Do not attempt logging in without password (bug #676)
|
||||
|
|
Loading…
Reference in a new issue