• unknown's avatar
    Fix for BUG#2757 · d68c56a4
    unknown authored
    "--read-only gives weird error on update".
    It is not fixable in 4.0 because it requires modifying
    the sql/share/*/errmsg.txt files. So it is fixed in 4.1 like this:
    the ER_SKIP_GRANT_TABLES is replaced by a more generic
    ER_OPTION_PREVENTS_STATEMENT which can be used both for
    "can't do this because of --skip-grant-tables" and
    "can't do this because of --read-only" (for this we don't use
    ER_CANT_UPDATE_WITH_READLOCK anymore).
    So now the message for --read-only is:
    "The MySQL server is running with the --read-only option so
    cannot execute this statement".
    
    
    include/mysqld_error.h:
      more general naming as more general message
    sql/share/czech/errmsg.txt:
      message change
    sql/share/danish/errmsg.txt:
      message change
    sql/share/dutch/errmsg.txt:
      message change
    sql/share/english/errmsg.txt:
      message change
    sql/share/estonian/errmsg.txt:
      message change
    sql/share/french/errmsg.txt:
      message change
    sql/share/german/errmsg.txt:
      message change
    sql/share/greek/errmsg.txt:
      message change
    sql/share/hungarian/errmsg.txt:
      message change
    sql/share/italian/errmsg.txt:
      message change
    sql/share/japanese/errmsg.txt:
      message change
    sql/share/korean/errmsg.txt:
      message change
    sql/share/norwegian-ny/errmsg.txt:
      message change
    sql/share/norwegian/errmsg.txt:
      message change
    sql/share/polish/errmsg.txt:
      message change
    sql/share/portuguese/errmsg.txt:
      message change
    sql/share/romanian/errmsg.txt:
      message change
    sql/share/russian/errmsg.txt:
      message change
    sql/share/serbian/errmsg.txt:
      message change
    sql/share/slovak/errmsg.txt:
      message change
    sql/share/spanish/errmsg.txt:
      message change
    sql/share/swedish/errmsg.txt:
      message change
    sql/share/ukrainian/errmsg.txt:
      message change
    sql/sql_acl.cc:
      Changes to use the more generic ER_OPTION_PREVENTS_STATEMENT
      instead of ER_SKIP_GRANT_TABLES:
      * use of net_printf() instead of send_error() (because send_error()
      does not support printf-like format).
      * in some places we now just do my_error() and return -1
      (only caller is mysql_execute_command() which does send_error()
      if result is -1).
      * Replaced my_printf_error() by simpler my_error() (except in 2 locations
      where there was a "we must use my_printf_error()" comment).
    sql/sql_parse.cc:
      new error code (more generic).
    d68c56a4
errmsg.txt 15.9 KB