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

Alter on long unique varchar column makes result null

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 10.4.3
    • 10.4.4
    • Server
    • None
    • All

    Description

       
      #
      #MDEV-18922 Alter on long unique varchar column makes result null
      #
      CREATE TABLE t1 (b int, a  varchar(4000));
      INSERT INTO t1 VALUES (1, 2),(2,3),(3,4);
      ALTER TABLE t1 ADD UNIQUE INDEX (a);
      SELECT * FROM t1;
      SELECT a FROM t1;
      drop table t1;
       
      
      

      Result

      CREATE TABLE t1 (b int, a  varchar(4000));
      INSERT INTO t1 VALUES (1, 2),(2,3),(3,4);
      ALTER TABLE t1 ADD UNIQUE INDEX (a);
      SELECT * FROM t1;
      b       a
      1       2
      2       3
      3       4
      SELECT a FROM t1;
      a
      NULL
      NULL
      NULL
      drop table t1;
                    
      

      Attachments

        Issue Links

          Activity

            People

              sachin.setiya.007 Sachin Setiya (Inactive)
              sachin.setiya.007 Sachin Setiya (Inactive)
              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.