Skip to content

Fix #17285 - Add DELIMITER $$ when exporting triggers#19942

Open
M393 wants to merge 3 commits intophpmyadmin:QA_5_2from
M393:export-triggers-delimiter
Open

Fix #17285 - Add DELIMITER $$ when exporting triggers#19942
M393 wants to merge 3 commits intophpmyadmin:QA_5_2from
M393:export-triggers-delimiter

Conversation

@M393
Copy link
Contributor

@M393 M393 commented Nov 14, 2025

Fixes #17285
image

and fixes a bug where the Loading... was not visible during export because it was immediately dismissed.

@M393 M393 force-pushed the export-triggers-delimiter branch from 5677111 to f734f08 Compare November 14, 2025 13:01
@M393
Copy link
Contributor Author

M393 commented Nov 14, 2025

Do you know where triggers are exported as html? When going to (Database or Table) -> Triggers export is done with AJAX.
I don't think this change causes a problem, but can't say for sure.

if ($this->response->isAjax()) {
$this->response->addJSON('message', htmlspecialchars(trim($exportData)));
$this->response->addJSON('title', $title);
exit;
}
$this->response->addHTML($this->template->render('database/triggers/export', [
'data' => $exportData,
'item_name' => $itemName,
]));
return;

@williamdes
Copy link
Member

Maybe special schema

'index.php?route=/database/routines&item_name=circumference&db=data'

@williamdes williamdes changed the title Add DELIMITER $$ when exporting triggers Fix 17285A dd DELIMITER $$ when exporting triggers Nov 15, 2025
@williamdes williamdes changed the title Fix 17285A dd DELIMITER $$ when exporting triggers Fix #17285 - Add DELIMITER $$ when exporting triggers Nov 15, 2025
@M393
Copy link
Contributor Author

M393 commented Nov 19, 2025

@williamdes Where do I find this in phpMyAdmin UI?

@williamdes
Copy link
Member

williamdes commented Dec 5, 2025

@williamdes Where do I find this in phpMyAdmin UI?

In the information_schema database, in the triggers tables :)
?route=/sql&db=information_schema&table=TRIGGERS&pos=0

@williamdes
Copy link
Member

Also fixes #19578 ?

M393 added 3 commits February 12, 2026 15:46
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
@M393
Copy link
Contributor Author

M393 commented Feb 12, 2026

Maybe special schema

'index.php?route=/database/routines&item_name=circumference&db=data'

The ACTION_COLUMN is transmitted to the browser as plain text and formatted with js, doesn't go through that function.

Triggers::export() is private and only called from Triggers::main(). The only two controllers who call Triggers::main() are Database/TriggersController and Table/TriggersController, so possibly unused code.

Anyways, this is what the html looks like when you force ajax to off:
image
It's a heading and textarea with the trigger sql inside - now with DELIMITER. 👍

@M393 M393 force-pushed the export-triggers-delimiter branch from f734f08 to 215c37b Compare February 12, 2026 18:28
@M393
Copy link
Contributor Author

M393 commented Feb 16, 2026

Also fixes #19578 ?

No, it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants