#3745 (ok 4.0) In AJAX mode not all queries added to pma_history table

3.5.4
fixed
nobody
AJAX (99)
1
2013-06-11
2012-12-01
Mike
No

In AJAX mode SQL history remembers SELECT queries only. No INSERT, DELETE, DROP, TRUNCATE - nothing except for SELECT got added into history table. Tried in many browsers - makes no difference.

Everything start working as it should be only if I set $cfg['AjaxEnable'] = false;

Discussion

  • Marc Delisle

    Marc Delisle - 2012-12-02
    • assigned_to: nobody --> lem9
    • status: open --> pending
     
  • Marc Delisle

    Marc Delisle - 2012-12-02

    If you are talking about the permanent history (activated with $cfg['QueryHistoryDB'] set to true and the proper Configuration Storage), I cannot reproduce your problem in version 3.5.4.

     
  • Mike

    Mike - 2012-12-02
    • status: pending --> open
     
  • Mike

    Mike - 2012-12-02

    Yes I meant permanent history that stored in the pma_history table. The problem still persists. Reproduced multiple times on multiple servers. Here is my typical environment:

    Server: local.server (Localhost via UNIX socket)
    Software: MySQL
    Software version: 5.1.66-log - Source distribution
    Protocol version: 10
    User: root@localhost
    Server charset: UTF-8 Unicode (utf8)

    Apache/2.2.15 (CentOS) (CentOS 6.3 x64)
    Database client version: libmysql - 5.1.66
    PHP extension: mysql

    phpMyAdmin Version information: 3.5.4 (up to date)

    Here is how to reproduce this bug. While AJAX is ON I executed the following set of statements, one by one. In order to get clean results each statement was executed in the right frame of the phpMyAdmin. I clicked at "SQL" in the right frame top row menu before executing each statement, just to have clear frame, without any artefacts after previous statment execution.

    Execute one by one:
    1) CREATE DATABASE `test12`;
    2) CREATE TABLE `table12` (`col1` int(11) NOT NULL AUTO_INCREMENT,`col2` int(11) NOT NULL,`col3` int(11) NOT NULL,PRIMARY KEY (`col1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    3) INSERT INTO `test12`.`table12` (`col1`, `col2`, `col3`) VALUES (NULL, '123', '456');
    4) INSERT INTO `test12`.`table12` (`col1`, `col2`, `col3`) VALUES (NULL, '111', '222');
    5) SELECT * FROM `table12`;
    6) REPAIR TABLE `table12`;
    7) DELETE FROM `table12` WHERE `col2`=123;
    8) OPTIMIZE TABLE `table12`;
    9) TRUNCATE TABLE `table12`;
    10) DROP TABLE `table12`;

    Here is what were added to the pma_history table. Empty lines mean that query was not logged. As you may see, 'CREATE DATABASE', 'INSERT', 'DELETE' and 'TRUNCATE' was not added to the history table:
    1)
    2) CREATE TABLE `table12` (`col1` int(11) NOT NULL AUTO_INCREMENT,`col2` int(11) NOT NULL,`col3` int(11) NOT NULL,PRIMARY KEY (`col1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    3)
    4)
    5) SELECT * FROM `table12`
    6) REPAIR TABLE `table12`
    7)
    8) OPTIMIZE TABLE `table12`
    9)
    10) DROP TABLE `table12`;

    Now, I will do all the same but with $cfg['AjaxEnable'] = false; option in the config file. For clear results I changed database and table names:

    1) CREATE DATABASE `test13`;
    2) CREATE TABLE `table13` (`col1` int(11) NOT NULL AUTO_INCREMENT,`col2` int(11) NOT NULL,`col3` int(11) NOT NULL,PRIMARY KEY (`col1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    3) INSERT INTO `test13`.`table13` (`col1`, `col2`, `col3`) VALUES (NULL, '123', '456');
    4) INSERT INTO `test13`.`table13` (`col1`, `col2`, `col3`) VALUES (NULL, '111', '222');
    5) SELECT * FROM `table13`;
    6) REPAIR TABLE `table13`;
    7) DELETE FROM `table13` WHERE `col2`=123;
    8) OPTIMIZE TABLE `table13`;
    9) TRUNCATE TABLE `table13`;
    10) DROP TABLE `table13`;

    Here is what were added to the pma_history table. Every single query was logged OK.

    1) CREATE DATABASE `test13`
    2) CREATE TABLE `table13` (`col1` int(11) NOT NULL AUTO_INCREMENT,`col2` int(11) NOT NULL,`col3` int(11) NOT NULL,PRIMARY KEY (`col1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1
    3) INSERT INTO `test13`.`table13` (`col1`, `col2`, `col3`) VALUES (NULL, '123', '456')
    4) INSERT INTO `test13`.`table13` (`col1`, `col2`, `col3`) VALUES (NULL, '111', '222')
    5) SELECT * FROM `table13`
    6) REPAIR TABLE `table13`
    7) DELETE FROM `table13` WHERE `col2`=123
    8) OPTIMIZE TABLE `table13`
    9) TRUNCATE TABLE `table13`
    10) DROP TABLE `table13`

    Hope this helps.

    By the way, when AJAX is turned OFF there is no 'alert' warnings when executing queries like 'DROP', 'DELETE', 'TRUNCATE'. I don't think this is how it should be.

    Thank you for great tool!
    Mike from the Ukraine :)

     
  • Mike

    Mike - 2012-12-04
    • status: open --> pending
     
  • Mike

    Mike - 2012-12-04
    • status: pending --> open
     
  • Mike

    Mike - 2012-12-04
    • summary: In AJAX mode SQL history remembers SELECT queries only --> In AJAX mode not all queries added to pma_history table
     
  • Marc Delisle

    Marc Delisle - 2012-12-04
    • assigned_to: lem9 --> nobody
     
  • Michal Čihař

    Michal Čihař - 2013-02-14
    • summary: In AJAX mode not all queries added to pma_history table --> (ok 4.0) In AJAX mode not all queries added to pma_history table
    • status: open --> open-fixed
    • priority: 5 --> 1
     
  • Michal Čihař

    Michal Čihař - 2013-02-14

    I can reproduce this with 3.5, but it seems to work correctly in 4.0, where related code was changed quite a lot.

     
  • Marc Delisle

    Marc Delisle - 2013-05-03
    • Status: open-fixed --> closed-fixed
     
  • Michal Čihař

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

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks