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

ERROR 1074 Column Length too long, recommends unobtainable value

    XMLWordPrintable

Details

    Description

      The 16383 max size recommended isn't achievable, recommendation should have been 16354.

      MariaDB [bb]> alter table bookings modify notes varchar(32000) character set utf8mb4;
      ERROR 1074 (42000): Column length too big for column 'notes' (max = 16383); use BLOB or TEXT instead
      MariaDB [bb]> alter table bookings modify notes varchar(16383) character set utf8mb4;
      ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
       
      MariaDB [bb]> alter table bookings modify notes varchar(16354) character set utf8mb4;
      Query OK, 257 rows affected (0.147 sec)            
      Records: 257  Duplicates: 0  Warnings: 0
       
      MariaDB [bb]> alter table bookings modify notes varchar(16355) character set utf8mb4;
      ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
       
      CREATE TABLE `bookings` (
        `hotel` varchar(10) NOT NULL,
        `nights` int(11) DEFAULT NULL,
        `customer` varchar(60) DEFAULT NULL,
        `price` decimal(40,3) DEFAULT NULL,
        `id` varchar(10) NOT NULL,
        `checkin` date NOT NULL,
        `checkout` date NOT NULL,
        `guests` int(11) DEFAULT NULL,
        `notes` varchar(16354) CHARACTER SET utf8mb4 DEFAULT NULL,
        PERIOD FOR `booking` (`checkin`, `checkout`),
        PRIMARY KEY (`id`),
        UNIQUE KEY `hotel` (`hotel`,`booking` WITHOUT OVERLAPS)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            danblack Daniel Black
            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.