-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle newer libmysqlclient #1
Comments
Hi Michiel, yes the main trouble with mysql client is the fact that it does not compile well with mingw-w64. I used to use kind of 3rd party binaries (mostly official builds) of libmysql.dll and just generate *.def + *.a files via gendef + dlltool. However this approach stopped to work at some point after 5.1.? (that's why I have stuck with so old version). Now (=today) I have tried to take the official libmysql.dll from mysql-connector-c v6.1.6 and generate *.def + *.a as described above, plus I have also created "fake" mysql_config.bat. These packs are available at:
The latest DBD::mysql nearly builds, I only had to apply this patch diff -ru DBD-mysql-4.037/dbdimp.h DBD-mysql-4.037-patched/dbdimp.h
--- DBD-mysql-4.037/dbdimp.h 2016-10-03 08:52:35.000000000 +0200
+++ DBD-mysql-4.037-patched/dbdimp.h 2016-10-11 21:17:11.609759000 +0200
@@ -27,7 +27,7 @@
/* For now, we hardcode this, but in the future,
* we can detect capabilities of the MySQL libraries
* we're talking to */
-#if defined(__WIN__)
+#if defined(WIN32)
#define MYSQL_ASYNC 0
#else
#define MYSQL_ASYNC 1
diff -ru DBD-mysql-4.037/mysql.xs DBD-mysql-4.037-patched/mysql.xs
--- DBD-mysql-4.037/mysql.xs 2016-10-03 08:52:35.000000000 +0200
+++ DBD-mysql-4.037-patched/mysql.xs 2016-10-11 21:23:47.699238900 +0200
@@ -904,15 +904,6 @@
case SQL_IDENTIFIER_QUOTE_CHAR:
retsv = newSVpv("`", 1);
break;
- case SQL_MAXIMUM_STATEMENT_LENGTH:
-#if !defined(net_buffer_length)
- /* From MySQL 5.7.9 net_buffer_length is no longer a macro
- that can be used. Instead we use mysql_get_option to retrieve the
- value into a local varaible. */
- mysql_get_option(NULL, MYSQL_OPT_NET_BUFFER_LENGTH, &net_buffer_length);
-#endif
- retsv = newSViv(net_buffer_length);
- break;
case SQL_MAXIMUM_TABLES_IN_SELECT:
/* newSViv((sizeof(int) > 32) ? sizeof(int)-1 : 31 ); in general? */
retsv= newSViv((sizeof(int) == 64 ) ? 63 : 31 ); Unfortunately I do not have any mysql server for testing, so if you have one + some spare time please try the binaries from URLs above. Regards |
Awesome! And very unfortunate that it requires this 'black magic' to get new libraries for perl on Windows. The first part of the patch is already in master: perl5-dbi/DBD-mysql@1f8c3fc Do you have an idea as of to why you need the second part, the patch to |
Without the second part I get the following error:
I have no idea what is |
Thanks! I found a notice in the release notes for the 5.7 API: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-9.html#mysqld-5-7-9-capi:
But the code the error points to does use |
It comes from using
Both |
Please also have a look at |
Will do. I like the |
Hello Michiel, I plan to release the next strawberry perl (5.24.1 + 5.22.3) approx. during the next weekend (Oct 22). If you can prepare a working version of DBD::mysql which works with the binaries mentioned above I will upgrade mysql client DLLs bundled with the next (Oct 22) strawberry perl release. |
That'll work! Thanks. I ran tests against MySQL Server and they all pass. Op zondag 16 oktober 2016 heeft kmx [email protected] het volgende
|
I have prepared even newer binaries based on mysql 5.7.16
Please test them with a patch for DBD-mysql that I have sent as the PR mentioned above. If it works please make a new DBD-mysql release. |
@kmx Would it be possible to update the MySQL libs to MySQL 8.0.x ? MySQL 5.7 has reached EOL and DBD::mysql now needs 8.0 or newer. |
@dveeden We can certainly look at packaging newer versions of mysql. However, since 5.38 has already been released, it likely wouldn't be doable until the release for 5.40. @shawnlaffan ideas? |
If the patch given above still applies then we could add it. Otherwise we'd need some help. I don't see an issue with adding it for 5.38.1. 5.40 is not due until May or so next year. |
I don't think that patch will apply anymore. Please let me know if you have any issues compiling DBD::mysql. |
I'm experiencing this same issue with latest Strawberry and latest DBD:mysql. |
There are some mysql binaries as an attachment at StrawberryPerl/Perl-Dist-Strawberry#157 that you could try building DBD::mysql against. |
Any update on this? Anything I can do to help? |
I've not had the opportunity yet. If you wanted to have a go then you could try adding the steps in StrawberryPerl/Perl-Dist-Strawberry#157 to the build system. It is possible to avoid rebuilding the full set of libs by having them already in the build tree. I need to document that (and would add notes here but I have to do it to remember the steps). |
@shawnlaffan I've tried the files from StrawberryPerl/Perl-Dist-Strawberry#157
Please note that MySQL has just released 8.4.0 LTS. MySQL 8.2.0 as used in |
Hi there! I'm a maintainer of DBD::mysql.
The libmysqlclient version shipped with StrawberryPerl is quite old (based on MySQL 5.1).
It would be awesome if StrawberryPerl could bundle a newer version of the mysql client libraries.
I saw your notes in the repository trying to compiling.
MySQL states compiling with MinGW is not supported, and you need to use Visual Studio.
http://forums.mysql.com/read.php?117,650075,650095#msg-650095
Would it be possible to use Visual Studio-built libraries and compile DBD::mysql around that using MinGW?
The text was updated successfully, but these errors were encountered: