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

ER_EVENT_STORE_FAILED upon creating event under some uca140_xxx_nopad_xx_xx collations

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.11
    • Character Sets, Events
    • None

    Description

      SET NAMES 'utf8mb3' COLLATE 'uca1400_swedish_nopad_ai_ci';
       
      CREATE TABLE t (a CHAR(8));
      INSERT INTO t VALUES ('foo');
      --error ER_TRUNCATED_WRONG_VALUE
      ALTER TABLE t MODIFY a INT;
      CREATE EVENT ev ON SCHEDULE EVERY 1 HOUR DO BEGIN END;
       
      # Cleanup
      DROP EVENT ev;
      DROP TABLE t;
      

      10.10 bb76dcbe

      query 'CREATE EVENT ev ON SCHEDULE EVERY 1 HOUR DO BEGIN END' failed: ER_EVENT_STORE_FAILED (1538): Failed to store event body. Error code 2 "No such file or directory" from storage engine
      

      I tried a few uca1400_xxxx_nopad_xx_xx collations, it was reproducible with each of them. Couldn't reproduce with non-nopad, non-uca1400, and non-language-specific (without xxxx) which I tried.

      Reproducible on 10.10/10.11.
      The test case isn't applicable to earlier versions due to the use of UCA1400 collations.
      On some reason the failing ALTER TABLE is important here, although I can't figure why.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov added a comment - - edited

            There are two problems here:

            • The column mysql.event.collation_connection is too short. The collation name utf8mb3_uca1400_swedish_nopad_ai_ci does not fit into it. This problem is now reported in a separate issue: MDEV-29776
            • mysql_alter_table() does not restore THD::count_cuted_field properly on failure.
              The second problem is also repeatable with a too long COMMENT. This script works without errors on CREATE EVENT:

            DROP EVENT IF EXISTS ev;
            DROP TABLE IF EXISTS t;
             
            SET sql_mode=DEFAULT;
            SET NAMES 'utf8mb3' COLLATE 'uca1400_swedish_nopad_ai_ci';
            CREATE TABLE t (a CHAR(8)) ENGINE=MyISAM;
            INSERT INTO t VALUES ('foo');
            #ALTER TABLE t MODIFY a INT;
            CREATE EVENT ev ON SCHEDULE EVERY 1 HOUR COMMENT 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' DO BEGIN END;
            

            Now if uncomment the ALTER TABLE, the script fails of CREATE EVENT:

            CREATE EVENT ev ON SCHEDULE EVERY 1 HOUR COMMENT 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' DO BEGIN END;
            

            ERROR 1552 (HY000): Data for column 'comment' too long
            

            bar Alexander Barkov added a comment - - edited There are two problems here: The column mysql.event.collation_connection is too short. The collation name utf8mb3_uca1400_swedish_nopad_ai_ci does not fit into it. This problem is now reported in a separate issue: MDEV-29776 mysql_alter_table() does not restore THD::count_cuted_field properly on failure. The second problem is also repeatable with a too long COMMENT. This script works without errors on CREATE EVENT: DROP EVENT IF EXISTS ev; DROP TABLE IF EXISTS t;   SET sql_mode= DEFAULT ; SET NAMES 'utf8mb3' COLLATE 'uca1400_swedish_nopad_ai_ci' ; CREATE TABLE t (a CHAR (8)) ENGINE=MyISAM; INSERT INTO t VALUES ( 'foo' ); # ALTER TABLE t MODIFY a INT ; CREATE EVENT ev ON SCHEDULE EVERY 1 HOUR COMMENT 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' DO BEGIN END ; Now if uncomment the ALTER TABLE, the script fails of CREATE EVENT: CREATE EVENT ev ON SCHEDULE EVERY 1 HOUR COMMENT 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' DO BEGIN END ; ERROR 1552 (HY000): Data for column 'comment' too long

            Now with the first problem (MDEV-29776) fixed, this issue is not a Blocker any more.

            The problem with COMMENT is repeatable in all versions 10.3 .. 10.11.

            Changing priority to `Major` and fixing `Affect Versions` accordingly.

            bar Alexander Barkov added a comment - Now with the first problem ( MDEV-29776 ) fixed, this issue is not a Blocker any more. The problem with COMMENT is repeatable in all versions 10.3 .. 10.11. Changing priority to `Major` and fixing `Affect Versions` accordingly.

            People

              bar Alexander Barkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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