Menu

#2962 (ok 3.3.1) Editing long triggers

2.11.8
fixed
1
2013-06-11
2010-01-13
Hardcode
No

In my case, i had a very long trigger for mysql. so i needed to edit that trigger but the querystring was too damn long.
the simplest way i could think to solve it was this:
file "libraries/tbl_triggers.lib.php" near line 34 added

$_SESSION["__session__sql"] = $drop_and_create;

near line 45 changed this

'<a href="tbl_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($drop_and_create) . '&amp;show_query=1&amp;delimiter=' . urlencode($delimiter) . '">' . $titles['Change'] . '</a>',

for this

'<a href="tbl_sql.php?' . $url_query . '&amp;sql_query=' . '&__session_sql=1&amp;show_query=1&amp;delimiter=' . urlencode($delimiter) . '">' . $titles['Change'] . '</a>',

so now the query is saved in a session var, and doesnt travel via GET

in the file 'libraries/sql_query_form.lib.php'
near line 80 changed this

if (true === $query) {
$query = $GLOBALS['sql_query'];
}

for this

if (true === $query) {
if($_GET["__session_sql"]) {
$query = $_SESSION["__session__sql"];
} else {
$query = $GLOBALS['sql_query'];
}
}

problem solved, i hope this helps anyone

it attaching both files, this is phpMyAdmin - 2.11.8.1deb5+lenny1

Discussion

  • Hardcode

    Hardcode - 2010-01-13

    both modifed files

     
  • Marc Delisle

    Marc Delisle - 2010-01-26

    In other similar cases we use a form instead of a link. See PMA_linkOrButton() in libraries/common.lib.php.

     
  • Marc Delisle

    Marc Delisle - 2010-03-06
    • milestone: --> 2.11.8
     
  • Marc Delisle

    Marc Delisle - 2010-03-06
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2010-03-06
    • summary: long querys cant be sent via GET --> Editing long triggers
     
  • Marc Delisle

    Marc Delisle - 2010-03-06
    • priority: 5 --> 1
    • summary: Editing long triggers --> (ok 3.3.1) Editing long triggers
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2010-03-06

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2010-03-16
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB