Bug #114858 C X DevAPI Connector mysqlx_collection_modify_set bug
Submitted: 2 May 20:22 Modified: 17 Jul 4:18
Reporter: Jens hansen Email Updates:
Status: Analyzing Impact on me:
None 
Category:MySQL Connectors: Document Store: DevAPI Severity:S1 (Critical)
Version:8.3.0 OS:MacOS
Assigned to: MySQL Verification Team CPU Architecture:ARM

[2 May 20:22] Jens hansen
Description:
I've been utilizing the C X DevAPI Connector and encountered an issue with the API.

The function 'mysqlx_collection_modify_set' should be capable of updating or creating the key name "_b_ke-y$fkæøåÆåø", but it is not performing any action when attempting to do so. However, it works as expected when the key name is something like "test".

I'm using it in this way:

mysqlx_collection_t *collection_ = mysqlx_get_collection(schema, collection, 0);

mysqlx_stmt_t *stmt2 = mysqlx_collection_modify_new(collection_);

mysqlx_set_modify_set(stmt2, "_b_ke-y$fkæøåÆåø", PARAM_EXPR("{\"username\":\"test\"}"), PARAM_END);

Could someone please confirm whether this is a bug, or if there's an intended alternative way to use it?

It's odd because other functions, like 'mysqlx_collection_create', can create a collection with the name "_b_ke-y$fkæøåÆåø".

How to repeat:
Try to use the keyname "_b_ke-y$fkæøåÆåø" with the function mysqlx_set_modify_set

mysqlx_collection_t *collection_ = mysqlx_get_collection(schema, collection, 0);

mysqlx_stmt_t *stmt2 = mysqlx_collection_modify_new(collection_);

mysqlx_set_modify_set(stmt2, "_b_ke-y$fkæøåÆåø", PARAM_EXPR("{\"username\":\"test\"}"), PARAM_END);
[9 Jul 12:21] MySQL Verification Team
Hello Jens hansen,

Thank you for the bug report.
Could you please provide repeatable test case(please make it as private if you prefer) to reproduce this issue at our end? Thank you.

Regards,
Ashwini Patil
[16 Jul 13:36] Jens hansen
Hi,

I already did that with the code:

mysqlx_collection_t *collection_ = mysqlx_get_collection(schema, collection, 0);

mysqlx_stmt_t *stmt2 = mysqlx_collection_modify_new(collection_);

mysqlx_set_modify_set(stmt2, "_b_ke-y$fkæøåÆåø", PARAM_EXPR("{\"username\":\"test\"}"), PARAM_END);

or do you need something else?  how would you store the key name _b_ke-y$fkæøåÆåø or "_b_ke-y$fkæøåÆåø or "_b_ke-y$fkæøåÆåø""! ?