Input Line Too Long Errors (Ugh) - Solution ?
Oye, this is a fun one. ;)
I have a largish SQL table that I want to check for its existance and create it if it does not. The table has 2 VARCHARS, 1 TINYINT and 40 INT fields. The sql query string to create it is too long, gives me that 'Input Line Too Long' error. Is there a compiler option to allow larger input strings? I could split the table into several smaller tables if absolutely necessary but thats not the elegant solution I am hoping for. ;) Thanks, Mug |
Break the string up and keep formatting it like this:
Code:
|
Thanks, that seems to work! :)
-Mug |
Erm, I spoke too soon... No compile errors but the table doesnt get created, I'm wondering if the dbi_query routine has a limit in the size of the query string it can accept... Here is a code snippet:
Code:
The server_print dumps this: Executing query: CREATE TABLE IF NOT EXISTS uwc3_skills ( name VARCHAR(32) NOT NULL, steamid VARCHAR(32) NOT NULL, nset TINYINT NOT NULL, skill1 SMALLINT, skill2 SMALLINT, skill3 SMALLINT, skill4 SMALLINT, skill5 SMALLINT, skill6 SMALLINT, skill7 SMALLIN I would have guessed that the Mysql server would have spat out an error but nothing shows up and no table created. -K2 |
The server_print() is cut off after something like 190 characters...
you will have to find another way of du mping it, perhaps by reading mysql logs or by using a file output function |
Gotcha Bail... Ok, I cleared the Mysql server error log, I dropped all the tables, I reran the server and this is the logged error:
Aborted connection 93 to db: 'uwc3' user: 'gmd' host: `localhost.localdomain' (Got an error reading communication packets) I tried a few times to make sure that one large table causes that error, it does, the other 2 tables being created in the same routine are created successfully. I also tested creating this particular large table with the mysql client, and a perl script and it worked fine which leads me to believe it is something with the amxx dbi module. :( -Mug |
| All times are GMT -4. The time now is 17:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.