[ODBC-32] max_allowed_packet_size error Created: 2016-03-16 Updated: 2016-04-12 Resolved: 2016-04-10 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | None |
| Affects Version/s: | 1.0.5 |
| Fix Version/s: | 1.0.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Fred Taylor | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Win7/Pro 32bit using VFP9/SP2. MariaDB 10.1.9 |
||
| Description |
|
Error connecting with MariaDB Connector/ODBC 1.0.5, I get an error using a DSN or a connection string from VFP. The "test" the DSN says it connects successfully. ConnectHandle = SQLSTRINGCONNECT("Driver= {MariaDB ODBC 1.0 Driver};Server=127.0.0.1;UID=root;PWD=secret;DB=test;Port=3306;Options=3;") The error is: and in the logfile, I see an attempt to set "max_allowed_packet_size" to 4096, and the next entry is "Quit". I do see "max_allowed_packet_size" in the debug symbols for the driver. |
| Comments |
| Comment by Lawrin Novitsky [ 2016-03-16 ] |
|
Thank you for your report. This is a funny bug to some degree, but more than a valid and serious bug. to your connection string. |
| Comment by Fred Taylor [ 2016-03-16 ] |
|
I'm sorry, but I'm not sure what/where you mean by the SQL_ATTR_PACKET_SIZE connection attribute. Where/how do I disable that, in the MY.INI? I'm very new to MariaDB/MySQL. Here's my current MY.INI file contents: Thanks for your help and patience. |
| Comment by Lawrin Novitsky [ 2016-03-16 ] |
|
No-no, that is done in C source code of your application. Or in VB code, if it is written in VB. If you are not developer or don't have source code of the application, you won't be able to do that. |
| Comment by Fred Taylor [ 2016-03-16 ] |
|
Thanks for the explanation. At this point, since I can use the MySQL driver, I can wait until this bug is fixed and released. I do question how a bug of this sort has not been reported before, as I surely can't be the first to use this driver in Windows. Either that or not many are using it in Windows, or just went to using the MySql driver when they got the error. Thanks again. |
| Comment by Lawrin Novitsky [ 2016-03-16 ] |
|
I really think this connection option is set quite rarely. |
| Comment by Fred Taylor [ 2016-03-16 ] |
|
That the issue. I'm not setting it, it just tries to set it as some kind of default, and since it can't find it, it errors out. |
| Comment by Lawrin Novitsky [ 2016-03-17 ] |
|
The connector doesn't try to set max_allowed_packet on its own - only if application asks it to. And application can do that only by setting aforementioned connection option. |
| Comment by Lawrin Novitsky [ 2016-04-10 ] |
|
The fix and the testcase have been pushed to both branches |
| Comment by Fred Taylor [ 2016-04-11 ] |
|
Thanks for the pretty rapid "fix". However, while the new version (1.06) now loads OK, in trying to retrieve some tables from a MariaDB 10.1.9 database, it crashes VFP with a C0000005 error. In my experience, that's the "catch-all" error code, so it probably won't be much use in finding the issue. I haven't narrowed it down yet as to what it is about the tables it doesn't like. Some tables work fine, even ones with 100K+ rows, but right now it seems to be the total field width of a row or maybe the number of fields. The ones that crash are our customer table (118 fields, 1431 bytes wide), and the inventory table (102 fields, 1701 bytes wide). I need to do more research to see exactly what's happening. The error occurred with the 32 bit version of the driver, I have not yet tried the 64 bit version. VFP can only use the 32 bit version anyways, but it will be more than just VFP accessing the data (also will be C# .NET , ASP .NET, php and python programs, so will be a mix of 32-bit and 64-bit. Let me know if there is any other info that may be of use to you. |
| Comment by Fred Taylor [ 2016-04-11 ] |
|
Looks like the issue is with BIT type fields (1 bit). Removing the BIT fields from the table allows the connector to retrieve data from the table. If there is a bit field, it crashes. |
| Comment by Lawrin Novitsky [ 2016-04-12 ] |
|
|