Copy triggers when copying table
This commit is contained in:
parent
84c65fcca6
commit
7b60b03e6a
|
@ -811,6 +811,12 @@ if (!defined("DRIVER")) {
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\"))) as $row) {
|
||||||
|
$trigger = $row["Trigger"];
|
||||||
|
if (!queries("CREATE TRIGGER " . ($target == DB ? idf_escape("copy_$trigger") : idf_escape($target) . "." . idf_escape($trigger)) . " $row[Timing] $row[Event] ON $name FOR EACH ROW\n$row[Statement];")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach ($views as $table) {
|
foreach ($views as $table) {
|
||||||
$name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table));
|
$name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table));
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Adminer 4.6.3-dev:
|
Adminer 4.6.3-dev:
|
||||||
Disallow using password-less databases
|
Disallow using password-less databases
|
||||||
|
Copy triggers when copying table
|
||||||
Stop session before connecting
|
Stop session before connecting
|
||||||
Simplify running slow queries
|
Simplify running slow queries
|
||||||
Decrease timeout for running slow queries from 5 seconds to 2 seconds
|
Decrease timeout for running slow queries from 5 seconds to 2 seconds
|
||||||
|
|
Loading…
Reference in a new issue