• unknown's avatar
    Make status of NO_BACKSLASH_ESCAPES mode known to the client so · 86d8abdb
    unknown authored
    it can use it to switch to only quoting apostrophes by doubling
    them when it is in effect. (Bug #10214)
    
    
    include/my_sys.h:
      Add new escape_quotes_for_mysql() function
    include/mysql_com.h:
      Add SERVER_STATUS_NO_BACKSLASH_ESCAPES
    libmysql/libmysql.c:
      Use SERVER_STATUS_NO_BACKSLASH_ESCAPES in server_status to determine
      how mysql_real_escape_string() should do quoting.
    mysys/charset.c:
      Add new escape_quotes_for_mysql() function that only quotes
      apostrophes by doubling them up.
    sql/set_var.cc:
      Set SERVER_STATUS_NO_BACKSLASH_ESCAPES when MODE_NO_BACKSLASH_ESCAPES
      changes.
    sql/sql_class.cc:
      Set SERVER_STATUS_NO_BACKSLASH_ESCAPES when necessary on thread creation.
    tests/mysql_client_test.c:
      Add new test for sending NO_BACKSLASH_ESCAPES as part of server_status.
    86d8abdb
libmysql.c 141 KB