Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18208

enum ('0','1','2','3') -> int type causes data increment '0' -> 1 ('x' -> x+1)

    XMLWordPrintable

Details

    Description

      https://dbfiddle.uk/?rdbms=mariadb_10.3&fiddle=a104c74c56d1a9e25ae1e5104016b774

       
       
          create table x (y enum ('0','1','2','3') );
       
       
          insert into x values ('1'),('0'),('2'),('3')
       
       
          select * from x
       
          | y  |
          | :- |
          | 1  |
          | 0  |
          | 2  |
          | 3  |
       
          alter table x modify y tinyint unsigned;
       
       
          select * from x;
       
          |  y |
          | -: |
          |  2 |
          |  1 |
          |  3 |
          |  4 |
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.