binary protocol: default values not supported in prepared statements

Description

Default values are not supported by prepared statements. This slows down batch operations since you need to retrieve the default value for a column from information_schema:

1 mysqll> CREATE TABLE t1 (a int default 2);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 mysql_stmt_prepare(stmt, "INSERT INTO t1 VALUES (?)"); for (i=0; i < numRows; i++) { if (RowPtr[i] == SQL_COLUMN_IGNORE) { /* since there is no MYSQL_TYPE_DEFAULT we need to retrieve the default value from information_schema. What a pain! */ } else { bind[0].buffer_type= MYSQL_TYPE_LONG; bind{0].buffer= &RowValues[i]; } mysql_stmt_execute(stmt); }

Environment

None

Status

Assignee

Unassigned

Reporter

Georg Richter

Labels

None

External issue ID

None

External issue ID

None

Time tracking

80h

Fix versions

Priority

Minor