This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

mysql command legth limit? 10.1.44-MariaDB-0ubuntu0.18.04.1

I am executing a create table command. If the character count in the single line create table command is greater than about 2950 characters I get Error: 1118 Row size too large. However, If I reduce the columns defined in the create command to less than about 2950 the create command executes and creates the table. Please note this has nothing to due with adding data to the table; I am just attempting to create a table with a bunch of columns.

Example1: no problem CREATE TABLE `xxx` ( `COL-1` VARCHAR(256) DEFAULT NULL,`COL-2` VARCHAR(256) DEFAULT NULL ) ENGINE=MYISAM

Example1: generates error 1118, where total character count is greater than about 3000 CREATE TABLE `xxx` ( `COL-1` VARCHAR(256) DEFAULT NULL, ... `COL-500` VARCHAR(256) DEFAULT NULL ) ENGINE=MYISAM

Is there a command line (keyboard buffer?) setting? I know another option is to use a multi-line command; What is the recommended EOL character?

Thanks

C -

Answer Answered by chris nord in this comment.

I was able to sort this out: The issue was the total VARCHAR(256) was greater then 65535 causing the error.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.