Bug #94733 Cannot update a field to an empty string with X DevAPI

Submitted: 21 Mar 2019 8:13 Modified: 10 Aug 2022 20:44
Reporter: Wheeler Tse Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:8.0.15 OS:Windows (Windows 10)
Assigned to: CPU Architecture:x86
Tags: X DevAPI

[21 Mar 2019 8:13] Wheeler Tse
Description:
We cannot update a field to an empty string with X DevAPI. And, if we try to do this, it will return us a general exception - "Parse error unserializing protobuf message".

How to repeat:
For Database
1. create a schema, and create a new table named "test" with below structure
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `name` varchar(45) NOT NULL,

For C# code
1. create an ASP.NET core project (in my case used core 2.2)
   Note: it can be repeat in a .NET console project with .NET framework
2. include MySQL.Data (version 8.0.15) through NuGet
3. writing bellow code and run it
   var client = MySQLX.GetClient(@"server=***;uid=***;pwd=***;database=***;", new
   {
       pooling = new { Enabled = true, MaxSize = 100, MaxIdleTime = 30000, QueueTimeout = 10000 }
   });
   using (var session = client.GetSession())
   {
       var table = session.GetCurrentSchema().GetTable("test");
       var statement = table.Insert("name").Values(string.Empty);
       var result = statement.Execute();
   }
[21 Mar 2019 9:47] MySQL Verification Team
Hello Wheeler Tse,

Thank you for the report.

regards,
Umesh
[10 Aug 2022 20:44] Daniel Valdez
Could not be reproduced using the latest Connector/NET release, 8.0.30. If
the issue persists, please update the bug report with the reproducible code
or open a new bug.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.