#320 Adding LIMIT 1 to DELETE/UPDATE statements

Common (150)

Adminer always adds "LIMIT 1" to DELETE or UPDATE statements. We run a Master/Slave-SQL-Replication. The LIMIT 1 leads to this warning:

130509 22:30:57 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: UPDATE `plots` SET `MINSTATUSREQUIRED` = '200' WHERE `ID` = '293' COLLATE utf8_bin AND `STATION` = '105' LIMIT 1

LIMIT 1 doesn't make sense in this kind of statements. Can it be removed?


  • Jakub Vrána

    Jakub Vrána - 2013-05-12
    • labels: 1629034 --> Common
    • status: open --> closed-fixed
  • Jakub Vrána

    Jakub Vrána - 2013-05-12

    Adminer allows editing rows in tables without a primary key. The LIMIT is there to support that. I've removed the limit if you are editing a row based on primary key (or non-NULL unique key).

  • Jakub Vrána

    Jakub Vrána - 2013-05-12

    Thank you for the report, I've fixed it in Git. You can download the "Current development version" from http://www.adminer.org/#download

  • Lorenz

    Lorenz - 2013-05-12

    Great job, thank you!


Log in to post a comment.