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

Online alter ignores strict table mode

Details

    Description

      When online alter is applied on top of intermediate DML changes, it converts data truncation errors and such into warnings, even if strict mode is enabled.

      --source include/have_debug_sync.inc
       
      create table t (a int);
      insert into t values (1),(2),(3);
      --send
        set debug_sync= 'now wait_for downgraded';
       
      --connect (con_alter,localhost,root,,test)
       
      set sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
      set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
      --send
        alter table t modify a int not null, algorithm=copy, lock=none;
       
      --connection default
      --reap
      insert into t values (null),(null);
      set debug_sync= 'now signal goforit';
       
      --connection con_alter
      --reap
      show create table t;
      select * from t;
       
      # Cleanup
      drop table t;
      set debug_sync= reset;
      

      bb-10.10-MDEV-16329 cb1f08bd1

      connection default;
      insert into t values (null),(null);
      set debug_sync= 'now signal goforit';
      connection con_alter;
      Warnings:
      Warning	1265	Data truncated for column 'a' at row 4
      Warning	1265	Data truncated for column 'a' at row 4
      show create table t;
      Table	Create Table
      t	CREATE TABLE `t` (
        `a` int(11) NOT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1
      select * from t;
      a
      1
      2
      3
      0
      0
      

      Reproducible the same way with at least InnoDB and MyISAM.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Sergei Golubchik made transition -
            Open In Progress
            2d 23h 6m 1
            Sergei Golubchik made transition -
            In Progress In Review
            15s 1
            Nikita Malyavin made transition -
            In Review Stalled
            28m 1s 1
            Sergei Golubchik made transition -
            Stalled In Testing
            5h 51m 1
            Sergei Golubchik made transition -
            In Testing Closed
            271d 21h 42m 1

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.