• unknown's avatar
    Bug #21284: Add Field::needs_quote() method and use it in Federated · 919c5596
    unknown authored
      The fix for bug 17608 removed the behavior of only adding quotes to values
      that needed it when constructing the queries sent by the federated storage
      engine. This restores that behavior, but using a new virtual Field method.
      (The old one had a hardcoded list of field types.)
    
      No test included. The behavior can be verified by inspecting the query log
      on the slave in the federated test.
    
    
    sql/field.h:
      Add str_needs_quotes() method to indicate whether the results of val_str()
      requires quoting when used in constructing an SQL query.
    sql/ha_federated.cc:
      Restore behavior of only quoting values that need it, using the new
      Field::str_needs_quotes() method.
    919c5596
ha_federated.cc 79.2 KB