[MDEV-6086] myodbc.so error: in sqlchar_as_sqlwchar () Created: 2014-04-14 Updated: 2015-02-25 Resolved: 2014-05-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.10 |
| Fix Version/s: | 10.0.11 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Steph Locke | Assignee: | Sergei Golubchik |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | upstream | ||
| Environment: |
Ubuntu 12.04 LTS, 64bit |
||
| Attachments: |
|
| Description |
|
I've been using mariadb for a while on Ubuntu 12.04 with an ODBC DSN that I could use in R. I am getting the following error
Using apport-retrace I have ascertained the issue to be
I have previously encountered libmyodbc errors from this bug which was about string handling and wonder whether it could be related? ODBC config /etc/odbcinst.ini
/etc/odbc.ini
Installed mariadb packages
Other packages
|
| Comments |
| Comment by Elena Stepanova [ 2014-04-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for the report. I was able to reproduce it as described. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-05-01 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is upstream issue. In mysql-5.6 they've changed the CHARSET_INFO structure, and we've merged this change into 10.0. Unfortunately, myodbc-5.1.10-1 (probably any 5.1.* but I didn't check that) uses CHARSET_INFO variables directly, so when myodbc is built with mysql-5.5 headers and used with 5.6 (or 10.0) library, it gets 5.5 offsets into 5.6 structure — basically, it reads garbage memory. I don't know what we can do about it, if we change CHARSET_INFO back, it will be incompatible with mysql-5.6. Perhaps (I'm not sure!) the only reasonable solution is to report a bug to debian and let them mark myodbc-5.1 as not compatible with libmysqlclient > 5.5 This is, of course, MySQL bug — because the change in CHARSET_INFO is incompatible, the library version should have been incremented, it should have been libmysqlclient19. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steph Locke [ 2014-05-01 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Sergei - could you tell me the likely timescales in which we will likely see a resolution of this issue from MySQL and/or debian? Thanks, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-05-01 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alternatively, one can say that it's not MySQL bug, but MyODBC bug. That CHARSET_INFO is not part of the MySQL client API, MyODBC has no rights to use it, and if it does — it can rightfully broken with any MySQL upgrade. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-05-01 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
slocke, sorry, no. I can speak neither for mysql nor for debian. I see three workarounds for you:
I, personally, would rebuild myodbc. It's as easy as apt-get source --compile libmyodbc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steph Locke [ 2014-05-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I'm not so good with Linux so forgive me but the compile statement is not proving easy. I would greatly appreciate it if you could post a workaround that is a bit more idiot-proof.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-05-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is what worked for me:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-05-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is MyODBC bug. MyODBC-5.1 uses CHARSET_INFO structure directly. This structure is not part of the client API, and thus there is no guarantee that it will stay compatible between releases. A conforming client is supposed to treat CHARSET_INFO structure as an opaque object and use MY_CHARSET_INFO when it needs to get information about character sets. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Reto [ 2015-02-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi guys when i am trying to compile the package on a "Debian Wheezy" latest version i get the following compile error. desc.c:66:66: error: macro "my_init_dynamic_array" requires 5 arguments, but only 4 given |