mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 20:01:25 +02:00
Copy triggers when copying table
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user