Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
10.5.5, 10.6.0
Description
When INSERT ... RETURNING fails, it sends metadata and afterwards error packet:
rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int not null auto_increment primary key, b json)");
|
check_mysql_rc(rc, mysql);
|
|
rc= mysql_query(mysql, "INSERT INTO t1 (a,b) VALUES (NULL, '[incorrect json]') RETURNING a");
|
check_mysql_rc(rc, mysql); /* <- this should fail */
|
|
result= mysql_store_result(mysql);
|
mysql_free_result(result);
|
|
diag("Error: %s", mysql_error(mysql));
|
Output:
Error: CONSTRAINT `t1.b` failed for `test`.`t1`
|