• unknown's avatar
    Fixed bug #31663: if the FIELDS TERMINATED BY string · fb75d93b
    unknown authored
    in the SELECT INTO OUTFILE clause starts with a special
    character (one of n, t, r, b, 0, Z or N) and ENCLOSED BY
    is empty, every occurrence of this character within a
    field value is duplicated.
    
    Duplication has been avoided.
    New warning message has been added: "First character of
    the FIELDS TERMINATED string is ambiguous; please use
    non-optional and non-empty FIELDS ENCLOSED BY".
    
    
    mysql-test/r/outfile_loaddata.result:
      BitKeeper file /home/uchum/work/bk/5.0-opt-31663/mysql-test/r/outfile_loaddata.result
      Added test case for bug #31663.
    mysql-test/t/outfile_loaddata.test:
      BitKeeper file /home/uchum/work/bk/5.0-opt-31663/mysql-test/t/outfile_loaddata.test
      Added test case for bug #31663.
    sql/sql_class.h:
      Fixed bug #31663.
      The select_export::is_ambiguous_field_term field has been added.
      This field is true if select_export::field_sep_char contains
      the first char of the FIELDS TERMINATED BY (ENCLOSED BY is empty),
      and items can contain this character.
      The select_export::field_term_char field has been added (first
      char of the FIELDS TERMINATED BY string or INT_MAX).
    sql/sql_class.cc:
      Fixed bug #31663.
      The select_export::prepare method has been modified to calculate
      a value of the select_export::is_ambiguous_field_term field and
      to warn if this value is true.
      The select_export::send_data method has been modified to
      avoid escaping or duplication of the field_set_char if
      is_ambiguous_field_term is true.
    sql/share/errmsg.txt:
      Fixed bug #31663.
      The ER_AMBIGUOUS_FIELD_TERM warning has been added.
    fb75d93b
errmsg.txt 338 KB