ClickHouse / ClickHouse/clickhouse-odbc
How can I workaround Malformed message: Too many header fields error?
- Dominant language
- C
- Stars
- 285
- Forks
- 105
- Avg merge
- 3h 56m
- Merged PRs (30d)
- 3
Description
After executing a SQL query, I'm getting "Too many header fields" error.
```R
nanodbc/nanodbc.cpp:1655: HY000: Malformed message: Too many header fields
```
I googled it but I couldn't figure out what's this `Too many header fields` means.
Could you elaborate on what does the error means and the possible workaround for this?
In the ODBC trace log file, I see below:
```sh
Rserve 2b34-2c98 ENTER SQLSetStmtAttr
SQLHSTMT 0x000000000E4E2270
SQLINTEGER 0
SQLPOINTER 0
SQLINTEGER 0
Rserve 2b34-2c98 EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x000000000E4E2270
SQLINTEGER 0
SQLPOINTER 0
SQLINTEGER 0
Rserve 2b34-2c98 ENTER SQLNumParams
HSTMT 0x000000000E4E2270
SWORD * 0x000000000061564E
Rserve 2b34-2c98 EXIT SQLNumParams with return code 0 (SQL_SUCCESS)
HSTMT 0x000000000E4E2270
SWORD * 0x000000000061564E (0)
Rserve 2b34-2c98 ENTER SQLFreeStmt
HSTMT 0x000000000E4E2270
UWORD 0
Rserve 2b34-2c98 EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
HSTMT 0x000000000E4E2270
UWORD 0
Rserve 2b34-2c98 ENTER SQLSetStmtAttr
SQLHSTMT 0x000000000E4E2270
SQLINTEGER 22
SQLPOINTER 1
SQLINTEGER 0
Rserve 2b34-2c98 EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x000000000E4E2270
SQLINTEGER 22
SQLPOINTER 1
SQLINTEGER 0
Rserve 2b34-2c98 ENTER SQLSetStmtAttr
SQLHSTMT 0x000000000E4E2270
SQLINTEGER 0
SQLPOINTER 0
SQLINTEGER 0
Rserve 2b34-2c98 EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x000000000E4E2270
SQLINTEGER 0
SQLPOINTER 0
SQLINTEGER 0
Rserve 2b34-2c98 ENTER SQLExecute
HSTMT 0x000000000E4E2270
Rserve 2b34-2c98 EXIT SQLExecute with return code -1 (SQL_ERROR)
HSTMT 0x000000000E4E2270
DIAG [HY000] Malformed message: Too many header fields (1)
```
SQL DBMS VER: "01.00.0000"
SQL_ODBC_VER: "03.80.0000"
SQL_DRIVER_VER: "1.1.9.20201226"
Contributor guide
Research direction
The report points to nanodbc/nanodbc.cpp:1655 and the SQLExecute call in the ODBC trace; start by reproducing the query with the listed driver and ODBC versions, then inspect that diagnostic path. Done means identifying the source of the malformed-message error and documenting a verified workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100