Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2016-02-18 07:55:56 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2016-02-18 07:55:56 +0300
commit176d63f10851ec2dd4331ac6aa03453ca417c8ee (patch)
treef659ecce37795f9d1f414e4456d8a8c52aaa103d /lint.php
parent2fdd232873daf36e3141bbedcf5f214cf0065187 (diff)
Fix #11979 DECLARE not accepted as valid SQL
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'lint.php')
-rw-r--r--lint.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lint.php b/lint.php
index 3aee35ba96..0ee1e28e7b 100644
--- a/lint.php
+++ b/lint.php
@@ -35,4 +35,16 @@ PMA_Response::getInstance()->disable();
PMA_headerJSON();
+if (! empty($_POST['options'])) {
+ $options = $_POST['options'];
+
+ if (! empty($options['routine_editor'])) {
+ $sql_query = 'CREATE PROCEDURE `a`() ' . $sql_query;
+ } elseif (! empty($options['trigger_editor'])) {
+ $sql_query = 'CREATE TRIGGER `a` AFTER INSERT ON `b` FOR EACH ROW ' . $sql_query;
+ } elseif (! empty($options['event_editor'])) {
+ $sql_query = 'CREATE EVENT `a` ON SCHEDULE EVERY MINUTE DO ' . $sql_query;
+ }
+}
+
echo json_encode(PMA_Linter::lint($sql_query));