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

Default value for Bit does not work for larger values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 0.9.5.Final
    • 0.9.4.Final
    • mysql-connector
    • None

    Description

      When an octet in BIT default value has the most significant bit set to 1 then conversion of defaut value fails. An example is

       CREATE TABLE user_subscribe (
      id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      uid char(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户ID',
      type tinyint(4) NOT NULL DEFAULT '0' COMMENT '-1自选股,-3关键词,-21自由组合,-22行业组合,-23概念组合,-4分析师,-5研究号',
      content bit(8) DEFAULT b'11111111' COMMENT '5个标志位,保留3个(沪深、港股、美股、基金、债券,)',
      PRIMARY KEY (id),
      KEY uid_type (uid,type)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订阅分组表';
      

      Attachments

        Activity

          People

            jpechane Jiri Pechanec
            jpechane Jiri Pechanec
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: