r/SQL • • 2d ago

MySQL Anyone using Apache doris have you faced this issue?

I am doing an insert query in apache doris and I am getting the following error:

SQL Error [1105] [HY000]: Flags = ' ,'

Please let me know if you have a solution for this one.

9 Upvotes

6 comments sorted by

1

u/neural_dataops 2d ago

That SQL Error [1105] [HY000] prefix is DBeaver's JDBC error format, and in Apache Doris the Flags = ' ,' message usually comes from a JDBC driver or session sql_mode mismatch on INSERT rather than a trailing comma in your VALUES clause.

First, check your DBeaver driver settings for the Doris connection: switch to the MySQL 5.1 or MariaDB JDBC driver if you are on MySQL Connector/J 8.x/9.x, and in Driver Properties set useServerPrepStmts=false (Doris does not fully support MySQL binary prepared statement flags on INSERT, which often surfaces as a malformed Flags error).

Second, run SHOW VARIABLES LIKE 'sql_mode'; in the same session to verify it is either empty or set to valid Doris modes like ONLY_FULL_GROUP_BY without stray spaces or commas. If you are inserting into a table with complex types like ARRAY or MAP, also share your Doris version and the table schema so it is easier to narrow down whether it is a Nereids planner bug.

1

u/silva_rhine 2d ago

Flags error usually means there's a formatting screw-up in the values youre trying to insert, like an extra comma or a missing quote somewhere. Double check your VALUES list, especially around string fields. Might be a sneaky trailing comma right before the closing parenthesis

1

u/Sanbi102 2d ago

Can you reproduce the same INSERT through the mysql CLI against a test table? That would help narrow down whether the problem is in the JDBC client or on the Doris side.

1

u/navicat-gu 1d ago

The [1105] [HY000] part is just the generic error Doris sends back over the MySQL protocol, so the useful detail is on the server side. Here's how I'd narrow it down:

  1. Get the real stack trace. On the FE node, search fe/log/fe.log (and fe.warn.log) around the time of the failed INSERT. The class that threw the "Flags" message tells you whether it's the parser, a load property or the session/driver.
  2. Take the client out of the picture. Run the exact statement from the mysql CLI (mysql -h <fe_host> -P 9030 -u <user>). If it works there, the problem is the JDBC driver or connection settings in DBeaver, not your SQL.
  3. If it only fails in DBeaver: try the other driver (MySQL Connector/J vs MariaDB), and compare running it as a single statement vs "Execute script". Some clients rewrite or split statements before sending them.
  4. Look for a literal ' ,'**.** Just a guess: that value looks like a separator string. If your INSERT (or the table/load properties) has something like a column_separator or a string with a leading space and a comma, check that first.

If you post your Doris version, SHOW CREATE TABLE and the INSERT (with dummy values), people can reproduce it.

For step 2 you can also use any other native (non-JDBC) MySQL-protocol client. I work on Navicat: Navicat 18 connects to MySQL-compatible servers, and Navicat Premium Lite is free to try. Doris isn't on our official supported list though, so treat that as a quick test, not a guarantee.

Disclosure: RC, Director of Digital Strategy @ Navicat (AI powered database tools)

1

u/Artistic_Cow_9586 1d ago

likely a malformed INSERT around the column/value list, especially a stray comma or quote

1

u/IcyAlgae9840 5h ago

can you post the full insert statement and the table definition?