Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-2698

Some column default values are not extracted correctly while reading table structure

    XMLWordPrintable

Details

    • Hide

      Exceptions are thrown for the following data types and the corresponding default values

       

       

      DATA_TYPE COLUMN_DEFAULT IS_NULLABLE
      (getdate()) datetime YES
      (NULL) datetime YES
      (getdate()) datetime2 NO
      (0) float NO
      (0) float YES
      (0) int NO
      (0) int YES
      (1) int YES
      (1000) int YES
      (NULL) int YES
      (0) numeric YES
      (0) numeric NO
      (1) numeric YES
      (0) smallint YES
      (0) smallint NO
      (0) smallint NO
      (1) smallint YES
      (NULL) varbinary YES
      (NULL) varchar YES

       

      Table definition:

      CREATE TABLE foo_table
      (
          foo_column1 DATETIME      DEFAULT getdate(),          -- (getdate())
          foo_column2 DATETIME2     DEFAULT getdate() NOT NULL, -- (getdate())
          foo_column3 DATETIME      DEFAULT NULL,               -- (NULL)
          foo_column4 INT           DEFAULT NULL,               -- (NULL)
          foo_column5 VARBINARY(8)  DEFAULT NULL,               -- (NULL)
          foo_column6 FLOAT         DEFAULT 0,                  -- (0)
          foo_column7 INT           DEFAULT 0,                  -- (0)
          foo_column8 NUMERIC(2, 1) DEFAULT 0,                  -- (0)
          foo_column9 SMALLINT      DEFAULT 0,                  -- (0)
      )
       
      
      Show
      Exceptions are thrown for the following data types and the corresponding default values     DATA_TYPE COLUMN_DEFAULT IS_NULLABLE (getdate()) datetime YES (NULL) datetime YES (getdate()) datetime2 NO (0) float NO (0) float YES (0) int NO (0) int YES (1) int YES (1000) int YES (NULL) int YES (0) numeric YES (0) numeric NO (1) numeric YES (0) smallint YES (0) smallint NO (0) smallint NO (1) smallint YES (NULL) varbinary YES (NULL) varchar YES   Table definition: CREATE TABLE foo_table ( foo_column1 DATETIME DEFAULT getdate(), -- (getdate()) foo_column2 DATETIME2 DEFAULT getdate() NOT NULL, -- (getdate()) foo_column3 DATETIME DEFAULT NULL, -- (NULL) foo_column4 INT DEFAULT NULL, -- (NULL) foo_column5 VARBINARY(8) DEFAULT NULL, -- (NULL) foo_column6 FLOAT DEFAULT 0, -- (0) foo_column7 INT DEFAULT 0, -- (0) foo_column8 NUMERIC(2, 1) DEFAULT 0, -- (0) foo_column9 SMALLINT DEFAULT 0, -- (0) )  

    Description

      Using

      • Sql Server 2008R2
      • sqlserver-connector v1.3.0.Final 

      Exceptions are thrown (see exceptions.txt attached) when extracting default values while reading table structure)

      • StringIndexOutOfBoundsException
      • NumberFormatException
      • SQLServerException
      • IllegalArgumentException

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              giovanni-1 Giovanni De Stefano (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: