Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute prepared statements with a large number of arguments #3208

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2012-12-14 13:23:32 +0100
From: Percy Wegmann <>
To: SQL devs <>
Version: 11.13.5 (Oct2012-SP1)
CC: @njnes

Last updated: 2013-01-22 09:29:04 +0100

Comment 18249

Date: 2012-12-14 13:23:32 +0100
From: Percy Wegmann <>

When executing a prepared statement with a high number of columns, some arguments are not recognized and I'm given an error of the form:

wrong number of arguments for prepared statement: 120, expected 147

I first saw this while using the JDBC API, but I see it from the mclient as well.

At first I thought 120 was a magic number, but when I constructed a test scenario to reproduce, the error changed a little:

wrong number of arguments for prepared statement: 100, expected 150

So, I guess it's not always the same cutoff point.

Comment 18250

Date: 2012-12-14 13:24:31 +0100
From: Percy Wegmann <>

Here is an MClient session for reproducing the issue.

sql>CREATE TABLE wide("1" VARCHAR(255), "2" VARCHAR(255), "3" VARCHAR(255), "4" VARCHAR(255), "5" VARCHAR(255), "6" VARCHAR(255), "7" VARCHAR(255), "8" VARCHAR(255), "9" VARCHAR(255), "10" VARCHAR(255), "11" VARCHAR(255), "12" VARCHAR(255), "13" VARCHAR(255), "14" VARCHAR(255), "15" VARCHAR(255), "16" VARCHAR(255), "17" VARCHAR(255), "18" VARCHAR(255), "19" VARCHAR(255), "20" VARCHAR(255), "21" VARCHAR(255), "22" VARCHAR(255), "23" VARCHAR(255), "24" VARCHAR(255), "25" VARCHAR(255), "26" VARCHAR(255), "27" VARCHAR(255), "28" VARCHAR(255), "29" VARCHAR(255), "30" VARCHAR(255), "31" VARCHAR(255), "32" VARCHAR(255), "33" VARCHAR(255), "34" VARCHAR(255), "35" VARCHAR(255), "36" VARCHAR(255), "37" VARCHAR(255), "38" VARCHAR(255), "39" VARCHAR(255), "40" VARCHAR(255), "41" VARCHAR(255), "42" VARCHAR(255), "43" VARCHAR(255), "44" VARCHAR(255), "45" VARCHAR(255), "46" VARCHAR(255), "47" VARCHAR(255), "48" VARCHAR(255), "49" VARCHAR(255), "50" VARCHAR(255), "51" VARCHAR(255), "52" VARCHAR(255), "53" VARCHAR(255), "54" VARCHAR(255), "55" VARCHAR(255), "56" VARCHAR(255), "57" VARCHAR(255), "58" VARCHAR(255), "59" VARCHAR(255), "60" VARCHAR(255), "61" VARCHAR(255), "62" VARCHAR(255), "63" VARCHAR(255), "64" VARCHAR(255), "65" VARCHAR(255), "66" VARCHAR(255), "67" VARCHAR(255), "68" VARCHAR(255), "69" VARCHAR(255), "70" VARCHAR(255), "71" VARCHAR(255), "72" VARCHAR(255), "73" VARCHAR(255), "74" VARCHAR(255), "75" VARCHAR(255), "76" VARCHAR(255), "77" VARCHAR(255), "78" VARCHAR(255), "79" VARCHAR(255), "80" VARCHAR(255), "81" VARCHAR(255), "82" VARCHAR(255), "83" VARCHAR(255), "84" VARCHAR(255), "85" VARCHAR(255), "86" VARCHAR(255), "87" VARCHAR(255), "88" VARCHAR(255), "89" VARCHAR(255), "90" VARCHAR(255), "91" VARCHAR(255), "92" VARCHAR(255), "93" VARCHAR(255), "94" VARCHAR(255), "95" VARCHAR(255), "96" VARCHAR(255), "97" VARCHAR(255), "98" VARCHAR(255), "99" VARCHAR(255), "100" VARCHAR(255), "101" VARCHAR(255), "102" VARCHAR(255), "103" VARCHAR(255), "104" VARCHAR(255), "105" VARCHAR(255), "106" VARCHAR(255), "107" VARCHAR(255), "108" VARCHAR(255), "109" VARCHAR(255), "110" VARCHAR(255), "111" VARCHAR(255), "112" VARCHAR(255), "113" VARCHAR(255), "114" VARCHAR(255), "115" VARCHAR(255), "116" VARCHAR(255), "117" VARCHAR(255), "118" VARCHAR(255), "119" VARCHAR(255), "120" VARCHAR(255), "121" VARCHAR(255), "122" VARCHAR(255), "123" VARCHAR(255), "124" VARCHAR(255), "125" VARCHAR(255), "126" VARCHAR(255), "127" VARCHAR(255), "128" VARCHAR(255), "129" VARCHAR(255), "130" VARCHAR(255), "131" VARCHAR(255), "132" VARCHAR(255), "133" VARCHAR(255), "134" VARCHAR(255), "135" VARCHAR(255), "136" VARCHAR(255), "137" VARCHAR(255), "138" VARCHAR(255), "139" VARCHAR(255), "140" VARCHAR(255), "141" VARCHAR(255), "142" VARCHAR(255), "143" VARCHAR(255), "144" VARCHAR(255), "145" VARCHAR(255), "146" VARCHAR(255), "147" VARCHAR(255), "148" VARCHAR(255), "149" VARCHAR(255), "150" VARCHAR(255));
operation successful (96.567ms)
sql>PREPARE INSERT INTO wide("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "123", "124", "125", "126", "127", "128", "129", "130", "131", "132", "133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150")
more>VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
execute prepared statement using: EXEC 1(...)
+---------+--------+-------+--------+-------+--------+
| type | digits | scale | schema | table | column |
+=========+========+=======+========+=======+========+
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
+---------+--------+-------+--------+-------+--------+
150 tuples (4.084ms)
sql>
sql>EXEC 1('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
EXEC: wrong number of arguments for prepared statement: 100, expected 150
sql>

-- I then tried the same query without the explicit columns, but got the same error

sql>PREPARE INSERT INTO WIDE VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
execute prepared statement using: EXEC 2(...)
+---------+--------+-------+--------+-------+--------+
| type | digits | scale | schema | table | column |
+=========+========+=======+========+=======+========+
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
| varchar | 255 | 0 | null | null | null |
+---------+--------+-------+--------+-------+--------+
150 tuples (4.147ms)
sql>EXEC 2('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
EXEC: wrong number of arguments for prepared statement: 100, expected 150

-- Doing it as an insert without first preparing it works

sql>INSERT INTO wide("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "123", "124", "125", "126", "127", "128", "129", "130", "131", "132", "133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150") VALUES ('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
1 affected row (45.940ms)

Comment 18251

Date: 2012-12-14 15:09:31 +0100
From: Percy Wegmann <>

Interestingly enough, if I insert NULLs rather than empty strings, the query succeeds.

This led me to sql/server/sql_parser.y line 3755:

if (m->emode == m_normal && m->caching && m->argc < 100) {

If I change the 100 to 10000, that solves my problem. The reason that the cutoff didn't always look like 100 is that NULLs are accepted happily by the parser, just not atoms.

The question now is, was there a reason for the argc < 100 condition?

Comment 18253

Date: 2012-12-14 18:10:41 +0100
From: @njnes

Changeset 013de2efeb3c made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=013de2efeb3c

Changeset description:

added test for bug #3208

fixed problem with maximun number of prepare arguments. Limit is no longer needed.

Comment 18359

Date: 2013-01-22 09:29:04 +0100
From: @sjoerdmullender

Oct2012-SP3 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant