Skip to content
  • Abhishek Ranjan's avatar
    95e48a2f
    Bug#26091333 : ASSERTION `RC == TYPE_OK' FAILED · 95e48a2f
    Abhishek Ranjan authored
    dd::Raw_record::store() asserts in debug version due to error in
    conversion of timestamp data.
    
    The sequence leading to assert is :
    - dd::Object is cached with local time stored for timestamp columns.
    - time_zone value is changed. Cached dd::Object is not aware of the change.
    - Any DDL operation which calls Dictionary_client::update() copies data
      from existing dd::Object.
    - During this copy, the timestamp column data is treated as local time
      and converted to epoch time according to value of time_zone before
      storing.
    
     - If timestamp value becomes invalid (negative) during conversion,
       it leads to an assert.
     - For invalid value of timestamp, release build will give an error
       for the DDL commands.
     - For valid value of timestamp, the value of create_time will change
       with DDL.
    
    Fix:
    
    - Store timestamp data for dd::Objects in GMT time_zone.
    - Cache timestamp data for dd::Objects in GMT time_zone.
    - Implement function gmt_time_to_local_time to convert GMT time
      to local time.
    - Return timestamp data based on the request flag by caller function.
      - Within dictionary framework, timestamp data should be requested
        with flag as false to get GMT time_zone data.
      - Server should request timestamp column data with flag as true
        to get local time_zone data.
    95e48a2f
    Bug#26091333 : ASSERTION `RC == TYPE_OK' FAILED
    Abhishek Ranjan authored
    dd::Raw_record::store() asserts in debug version due to error in
    conversion of timestamp data.
    
    The sequence leading to assert is :
    - dd::Object is cached with local time stored for timestamp columns.
    - time_zone value is changed. Cached dd::Object is not aware of the change.
    - Any DDL operation which calls Dictionary_client::update() copies data
      from existing dd::Object.
    - During this copy, the timestamp column data is treated as local time
      and converted to epoch time according to value of time_zone before
      storing.
    
     - If timestamp value becomes invalid (negative) during conversion,
       it leads to an assert.
     - For invalid value of timestamp, release build will give an error
       for the DDL commands.
     - For valid value of timestamp, the value of create_time will change
       with DDL.
    
    Fix:
    
    - Store timestamp data for dd::Objects in GMT time_zone.
    - Cache timestamp data for dd::Objects in GMT time_zone.
    - Implement function gmt_time_to_local_time to convert GMT time
      to local time.
    - Return timestamp data based on the request flag by caller function.
      - Within dictionary framework, timestamp data should be requested
        with flag as false to get GMT time_zone data.
      - Server should request timestamp column data with flag as true
        to get local time_zone data.
Loading