Bug #74273 Unsupported buffer type for mysql_stmt_bind_result function
Submitted: 8 Oct 2014 14:48 Modified: 13 Oct 2014 10:19
Reporter: Milosz Bodzek Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / C++ Severity:S3 (Non-critical)
Version:1.1.4 OS:Linux (Ubuntu 14.04 64 bit)
Assigned to: Assigned Account CPU Architecture:Any

[8 Oct 2014 14:48] Milosz Bodzek
Description:
Call function mysql_stmt_bind_result (with simple select that contain geometry data type and buffer with type MYSQL_TYPE_GEOMETRY) fail. Call mysql_stmt_error function after that return message: "Using unsupported buffer type: 255  (parameter: 2)"

How to repeat:
1. Create database with geometry data:
CREATE DATABASE `MigrationTestGeometry` /*!40100 DEFAULT CHARACTER SET latin1 */;
CREATE TABLE `geom` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` geometry DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
INSERT INTO geom(data) VALUES (GeomFromText('POINT(1 1)'));

2. In C++ code connect to that database and create select staement: SELECT id, data FROM geom;

3. Call mysql_stmt_bind_result(_select_stmt, &(rowbuffer[0])) with that select staement and buffer that have buffer_type = MYSQL_TYPE_GEOMETRY

Function will return false and call mysql_stmt_error function after that return message: "Using unsupported buffer type: 255  (parameter: 2)"
[10 Oct 2014 12:26] Hemant Dangi
MYSQL_TYPE_GEOMETRY is not supported by mysql_stmt_bind_result returning error.
Error: Using unsupported buffer type: 253  (parameter: 1)

So error need to be resolved in C/C first.
[10 Oct 2014 12:34] Hemant Dangi
Added bugs for C/C bugs#74315.
[13 Oct 2014 10:19] Umesh Shastry
Hello Milosz/Hemant,

Thank you for the bug report and test case.

Thanks,
Umesh
[13 Oct 2014 10:21] Umesh Shastry
//

[root@cluster-repo mysql-advanced-5.6.22]# ./test_geometryCC
Using unsupported buffer type: 255  (parameter: 2)
[16 Jan 2015 12:54] Hemant Dangi
Resolution depends upon bug#74315 marked for C API.