[CONCPP-22] Change in the Public API field size related parameter/return value types from int32_t to uint32_t Created: 2020-07-06  Updated: 2020-07-20  Resolved: 2020-07-20

Status: Closed
Project: MariaDB Connector/C++
Component/s: General
Affects Version/s: None
Fix Version/s: 0.9.3

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Maximal size of the field in MariaDB is (max unsigned int) value. Thus, int32_t is not enough, and methods like
virtual int32_t getMaxFieldSize()=0;
virtual void setMaxFieldSize(int32_t max)=0;
have to be changed to
virtual uint32_t getMaxFieldSize()=0;
virtual void setMaxFieldSize(uint32_t max)=0;

This probably can be extended with some naturally unsigned methods, like set of database metadata methods returning version numbers.
uint32_t getDatabaseMajorVersion();
uint32_t getDatabaseMinorVersion();
uint32_t getDatabasePatchVersion();
uint32_t getJDBCMajorVersion();
uint32_t getJDBCMinorVersion();
uint32_t getCDBCMajorVersion();
uint32_t getCDBCMinorVersion();

Then it probably doesn't make sense to leave getMajorVersion() and getMinorVersion() methods in the Driver signed.



 Comments   
Comment by Lawrin Novitsky [ 2020-07-20 ]

The change is pushed as part of the commit 1c9861e

Generated at Thu Feb 08 03:07:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.