[CONC-20] libmysqlclient incompatibility: uses MYSQL_TYPE_NEWDATE, not supported by MySQL Connector/C++ Created: 2013-03-23 Updated: 2013-03-23 Resolved: 2013-03-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Lionel Elie Mamane | Assignee: | Georg Richter |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Reproduced on MacOS X and Debian GNU/Linux amd64 |
||
| Description |
|
Using bzr/launchpad snapshot revision 40, connecting to MySQL. Given the table: CREATE TABLE `oldfmpro` ( and the view CREATE OR REPLACE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `natpha_ddl` AS When calling mysql_fetch_field on "SELECT * FROM natpha_ddl", for column NATPHA, mariadb client library for C returns: {name = 0x285b2b8 "NATPHA", ... type = MYSQL_TYPE_NEWDATE, ...}Which breaks MySQL Connector/C++, which does not support this column type; it throws error: Background:
Full table definition: CREATE TABLE `oldfmpro` ( Full view definition: CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`alex`@`%` SQL SECURITY DEFINER VIEW `natpha_ddl` AS select `oldfmpro`.`File_Num` AS `file_num`,`oldfmpro`.`Owner1` AS `Owner1`,`oldfmpro`.`Filing_Num` AS `filing_num`,`oldfmpro`.`Filing_Date1` AS `filing_date1`,`oldfmpro`.`Prio_FF_Date1` AS `Prio_FF_Date1`,if(((`oldfmpro`.`Prio_FF_Date1` + interval 30 month) is not null),(`oldfmpro`.`Prio_FF_Date1` + interval 30 month),(`oldfmpro`.`Filing_Date1` + interval 30 month)) AS `NATPHA` from `oldfmpro` where ((`oldfmpro`.`Filing_Num` is not null) and (`oldfmpro`.`Ctry_Short` = 'WO') and (`oldfmpro`.`IngJur` like '%ajt%') and (`oldfmpro`.`Filing_Date1` >= (curdate() + interval -(30) month))) order by if(((`oldfmpro`.`Prio_FF_Date1` + interval 30 month) is not null),(`oldfmpro`.`Prio_FF_Date1` + interval 30 month),(`oldfmpro`.`Filing_Date1` + interval 30 month)); |
| Comments |
| Comment by Georg Richter [ 2013-03-23 ] | ||||||||||||||||||||||||||||||||
|
This is not a bug, MYSQL_TYPE_NEWDATE is returned from Server. If MySQL Connector/C++ doesn't support it, you should file a bug report or feature reqeust for.
| ||||||||||||||||||||||||||||||||
| Comment by Georg Richter [ 2013-03-23 ] | ||||||||||||||||||||||||||||||||
|
This is not a bug, MYSQL_TYPE_NEWDATE is returned from Server. If MySQL Connector/C++ doesn't support it, you should file a bug report or feature reqeust for. georg@linux-eozo:~> mysql -uroot test --column-type-info Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create table t1(a date, b date); mysql> select if(a is NULL, b, a) FROM t1; 0 rows in set (0.00 sec) | ||||||||||||||||||||||||||||||||
| Comment by Lionel Elie Mamane [ 2013-03-23 ] | ||||||||||||||||||||||||||||||||
|
So it seems... I get the same problem with libmysqlclient, so indeed this bug report is invalid. I put too much faith in the bugreport at LibreOffice, which said "it worked before, and since LibreOffice switched from libmysqlclient to mariadb client for C, it gives this error message". Sorry for the noise. |