• unknown's avatar
    Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS · b1b1d627
    unknown authored
    command and reported to a client.
    
    The fact that a timestamp field will be set to NO on UPDATE wasn't shown 
    by the SHOW COMMAND and reported to a client through connectors. This led to
    problems in the ODBC connector and might lead to a user confusion.
    
    A new filed flag called ON_UPDATE_NOW_FLAG is added. 
    Constructors of the Field_timestamp set it when a field should be set to NOW
    on UPDATE.
    
    The get_schema_column_record function now reports whether a timestamp field
    will be set to NOW on UPDATE.
    
    
    mysql-test/t/information_schema.test:
      A test case adjusted after fixing the bug#30081.
    mysql-test/r/type_timestamp.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/type_ranges.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/show_check.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/ps_5merge.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/ps_4heap.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/ps_3innodb.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/ps_2myisam.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/metadata.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/log_tables.result:
      Adjusted a test case after fixing bug#30081.
    mysql-test/r/information_schema.result:
      A test case adjusted after fixing the bug#30081.
    mysql-test/r/grant.result:
      Adjusted a test case after fixing bug#30081.
    tests/mysql_client_test.c:
      A test case adjusted after fixing the bug#30081.
    sql/sql_show.cc:
      Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
      command and reported to a client.
      The get_schema_column_record function now reports whether a timestamp field
      will be set to NOW on UPDATE.
    sql/field.cc:
      Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
      command and reported to a client.
      Constructors of the Field_timestamp set the ON_UPDATE_NOW_FLAG on a field when
      it should be set to NOW on UPDATE.
    include/mysql_com.h:
      Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
      command and reported to a client.
      A new filed flag called ON_UPDATE_NOW_FLAG  is added.
    client/mysql.cc:
      Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
      command and reported to a client.
      The fieldflag2str function is adjusted to print the ON_UPDATE_NOW_FLAG.
    b1b1d627
ps_4heap.result 103 KB