May be a bug in mariadb 10.2.6

[expired user #10876]'s profile image [expired user #10876] posted 7 years ago in General Permalink

May be a bug, please check. Heidisql 9.4.0.5174 protable, mariadb 10.2.6 win10 x64

drop table if exists `promo_code`;
create table if not exists `promo_code` (
    `code_char`         char(8)                     not null                    comment '优惠码',    
    `discount_num`      decimal(10,2)   unsigned    not null                    comment '折扣金额',    
    `used_count`        smallint(4)     unsigned    not null    default 0       comment '使用计数',
    `used_limit`        smallint(4)     unsigned    not null    default 0       comment '使用上限',   
    `start_time`        int(12)         unsigned    not null    default 0       comment '开始时间',
    `stop_time`         int(12)         unsigned    not null    default 0       comment '结束时间',
    `agent_id`          int(10)         unsigned    not null    default 0       comment '代理编号',
    `user_id`           int(10)         unsigned    not null    default 0       comment '会员编号',
    `promotion_char`    varchar(16)                 not null                    comment '活动标识',
    `apply_phone`       char(16)                    not null    default ''      comment '申请手机',
    unique index `code_char` (`code_char`),
    index `apply_phone` (`apply_phone`)
) engine=innodb collate='utf8mb4_general_ci' comment='推广优惠码';

When I execute this sql, some setting can't recognized. As the picture shows. And this sql execute in mariadb 5.5 is right.

2 attachment(s):
  • bg
  • bg2
[expired user #1502]'s profile image [expired user #1502] posted 7 years ago Permalink

This is the same issue: https://www.heidisql.com/forum.php?t=24014#p24019

With MySQL and MariaDB 10.1 the server quotes defaults' values. Heidi's parser should be modified to correctly extract non-quoted default values and everything that are going after them.

Please login to leave a reply, or register at first.