Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-46235

default InnoDB database tables in MySQL cannot handle more than 10 text columns (varchar also affected)

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1/ execute unit tests in all database, mysql without innodb_file_format=Barracuda and innodb_file_per_table=1 is supposed to fail with descriptive error message

      2/ execute unit tests in various MySQLs and MariaDBs you may try to tweak following settings in my.cnf:

      • innodb_file_format
      • innodb_file_per_table

      3/ ideally test both InnoDB and XtraDB via $CFG->dboptions = array('dbengine' => 'xxx');

      4/ install moodle without the patch on MySQL and try all options of the new CLI tool at admin/cli/mysql_compressed_rows.php (ideally with and without the SUPER privilege) - the script should modify the tables if DB is configured properly or if db user has SUPER priv, error message should be printed if db cannot be fixed automatically

      Show
      1/ execute unit tests in all database, mysql without innodb_file_format=Barracuda and innodb_file_per_table=1 is supposed to fail with descriptive error message 2/ execute unit tests in various MySQLs and MariaDBs you may try to tweak following settings in my.cnf: innodb_file_format innodb_file_per_table 3/ ideally test both InnoDB and XtraDB via $CFG->dboptions = array('dbengine' => 'xxx'); 4/ install moodle without the patch on MySQL and try all options of the new CLI tool at admin/cli/mysql_compressed_rows.php (ideally with and without the SUPER privilege) - the script should modify the tables if DB is configured properly or if db user has SUPER priv, error message should be printed if db cannot be fixed automatically
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip_MDL-46235_m28_innodbtext

      Description

      Some addons may try to create tables with very many text columns, the problem is that later inserts into the table end up with error message:

      core_ddl_testcase::test_innodb_wide_tables
      dml_write_exception: Error writing to database (Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
      INSERT INTO phpu_test_innodb (text0,text1,text2,text3,text4,text5,text6,text7,text8,text9,text10,text11,text12,text13,text14,text15,text16,text17,text18,text19) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

      Multiple standard tables are affected too - user, profile fields and mod_data tables.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Integrator:
              Damyon Wiese
              Tester:
              Zachary Durber
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Nov/14