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

Alter on long unique varchar column makes result null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 10.4.3
    • Fix Version/s: 10.4.4
    • Component/s: Server
    • Labels:
      None
    • Environment:
      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

              Assignee:
              sachin.setiya.007 Sachin Setiya
              Reporter:
              sachin.setiya.007 Sachin Setiya
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: