Bug #43489 NDBAPI Cannot Store Values To SMALLINT/TINYINT Columns
| Submitted: | 9 Mar 2009 6:00 | Modified: | 26 Dec 2010 14:06 |
|---|---|---|---|
| Reporter: | Mikiya Okuno | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Cluster: NDB API | Severity: | S2 (Serious) |
| Version: | mysql-5.1-telco-6.3 | OS: | Solaris (SPARC) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | mysql-5.1-telco-6.3.20 | ||
[9 Mar 2009 6:00]
Mikiya Okuno
[9 Mar 2009 9:40]
MySQL Verification Team
Casting explicitly fixed the problem.
myOperation->setValue("ATTR2", (Uint16)i);
[12 Mar 2009 7:52]
MySQL Verification Team
Modified simple_ndbapi.cpp
Attachment: ndbapi_simple.cpp (text/plain), 9.13 KiB.
[12 Mar 2009 8:08]
MySQL Verification Team
I retest using a table with SMALLINT column. The modifications of attached ndbapi_simple.cpp are listed below: * setValue(const char*, const char*, int) is used instead of (const char*, Uint32). * Add a buffer for int2store(). * Data is converted using int2store() in advance. * Change the data type for i (a variable for loop) from int to uint16. When I execute the program, the output is like the following: ATTR1 ATTR2 0 167772160 1 16777216 2 201326592 Detected that deleted tuple doesn't exist! 4 234881024 5 83886080 6 268435456 7 117440512 8 301989888 9 150994944 Instead of expected output: ATTR1 ATTR2 0 10 1 1 2 12 Detected that deleted tuple doesn't exist! 4 14 5 5 6 16 7 7 8 18 9 9 Why don't we add an interface like setValue(const char*, Uint16)?
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 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.