Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Issues 185 & 189 #190

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Issues 185 & 189 #190

wants to merge 7 commits into from

Conversation

jakemonO
Copy link

@jakemonO jakemonO commented Mar 9, 2020

185: mysql won’t start in Linux. Added symlinks to bindir.
189: mysql8 won’t start in Windows added req’d libs to bindir.
Created MySQL8-specific unittest (copied from EmbeddedMysqlTest) but disabled references that require GLOBAL_VARIABLES table as the table has been supplanted in MySQL8 (and I don’t have time to restructure the test to use the new system schema tables.)

#185 #186

@borsch
Copy link

borsch commented Apr 7, 2020

@jakemonO are you going to merge this?

@jakemonO
Copy link
Author

jakemonO commented Apr 8, 2020

@borsch I don't have the authority that I know of. I would if I could...

@borsch
Copy link

borsch commented Apr 8, 2020

@viliusl wil you?

@ericsun2
Copy link

For Linux, it will be safer to also add OS env var
LD_LIBRARY_PATH=${embedmysql}/bin:${embedmysql}/lib:${embedmysql}/lib/private:.
to make sure mysqld can find and load the so files.

MySql 8.0.19 and 8.0.20 have put the deps into lib/private without creating symlink inside bin anymore.

Comment on lines 31 to 35
File libDir = new File(baseDir + SEP + "lib");
FileFilter filter = new RegexFileFilter("^[a-z]+\\.so(\\.[0-9]+)+");
File[] soFiles = libDir.listFiles(filter);
for (File file : soFiles) {
Files.createSymbolicLink(Paths.get(baseDir + SEP + "bin" + SEP + file.getName()), Paths.get(file.getPath()));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely like this much better than the original implementation. ^_^

Can you also enhance this part to support 8.0.19 and later's style?

$ pwd; ls -lR lib/*/*.so.*
mysql-8.0.19-linux-glibc2.12-x86_64

-rwxr-xr-x 1 esun eng  3056988 Dec  9 14:43 lib/private/libcrypto.so.1.1
-rwxr-xr-x 1 esun eng  5408408 Dec  9 14:43 lib/private/libprotobuf-lite.so.3.6.1
-rwxr-xr-x 1 esun eng 45294256 Dec  9 14:45 lib/private/libprotobuf.so.3.6.1
-rwxr-xr-x 1 esun eng   657635 Dec  9 14:43 lib/private/libssl.so.1.1

The 4 so files are all needed, but they are one level deeper inside lib

Copy link
Author

@jakemonO jakemonO May 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The master readme doc specifically states the req for those OS level dependencies to be installed. This will work instead of those deps? If so, I think that should be a different patch to remove the external dependencies.

Do you also happen to know of there are windows equivalents to these dependencies?

Copy link

@ericsun2 ericsun2 May 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The master readme approach will be pretty annoying for CI/INT environment, because we don't have permission to go there and manually install any 3rd party files. For Linux and Mac, if we can make use of the bundled *.so files, why do we have to sudo install anything?

As for Windows, the DLL files are all inside the bin already:

$ ls -l mysql-8.0.20-winx64/bin/*.dll
-rw-rw-rw- 1 esun eng 3384320 Mar  6 04:21 mysql-8.0.20-winx64/bin/libcrypto-1_1-x64.dll
-rw-rw-rw- 1 esun eng 1839616 Feb 27 04:46 mysql-8.0.20-winx64/bin/libmecab.dll
-rw-rw-rw- 1 esun eng 6380032 Mar 31 05:04 mysql-8.0.20-winx64/bin/libprotobuf-debug.dll
-rw-rw-rw- 1 esun eng 2573312 Mar 31 05:20 mysql-8.0.20-winx64/bin/libprotobuf.dll
-rw-rw-rw- 1 esun eng 1039872 Mar 31 05:03 mysql-8.0.20-winx64/bin/libprotobuf-lite-debug.dll
-rw-rw-rw- 1 esun eng  404992 Mar 31 05:18 mysql-8.0.20-winx64/bin/libprotobuf-lite.dll
-rw-rw-rw- 1 esun eng  679424 Mar  6 04:21 mysql-8.0.20-winx64/bin/libssl-1_1-x64.dll

185: mysql won’t start in Linux. Added symlinks to bindir.
189: mysql8 won’t start in Windows added req’d libs to bindir.
Created MySQL8-specific unittest (copied from EmbeddedMysqlTest) but disabled references that require GLOBAL_VARIABLES table as the table has been supplanted in MySQL8 (and I don’t have time to restructure the test to use the new system schema tables.)

Date:      Mon Mar 9 12:07:31 2020 -0400

Changes to be committed:
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/Setup.java
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Win8FileSetEmitter.java
	new file:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/setup/NixBefore8Initializer.java
	new file:   wix-embedded-mysql/src/test/scala/com/wix/mysql/EmbeddedMysql8Test.scala
Date:      Mon Mar 9 15:01:32 2020 -0400

Changes to be committed:
	modified:   wix-embedded-mysql/src/test/scala/com/wix/mysql/EmbeddedMysql8Test.scala
This reverts commit 8e6a66a.

Date:      Mon Mar 9 16:01:47 2020 -0400

Changes to be committed:
	modified:   wix-embedded-mysql/src/test/scala/com/wix/mysql/EmbeddedMysql8Test.scala
Date:      Mon Mar 9 16:03:33 2020 -0400

Changes to be committed:
	modified:   wix-embedded-mysql/src/test/scala/com/wix/mysql/EmbeddedMysql8Test.scala
…ggy & slow testing suites

Date:      Mon Sep 14 09:46:56 2020 -0400

Changes to be committed:
	modified:   wix-embedded-mysql-download-and-extract/pom.xml
	renamed:    wix-embedded-mysql-download-and-extract/src/test/java/com/wix/mysql/MysqlDownloadAndExtractIT.scala -> wix-embedded-mysql-download-and-extract/src/test/java/com/wix/mysql/MysqlDownloadAndExtractIT.scal_
	modified:   wix-embedded-mysql/pom.xml
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/config/MysqldConfig.java
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/FileSet.java
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/Version.java
	new file:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix818FileSetEmitter.java
	new file:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix8GTE19FileSetEmitter.java
	renamed:    wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix8FileSetEmitter.java -> wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix8LTE17FileSetEmitter.java
	new file:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Win8GTE18FileSetEmitter.java
	renamed:    wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Win8FileSetEmitter.java -> wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Win8LTE17FileSetEmitter.java
	renamed:    wix-embedded-mysql/src/test/scala/com/wix/mysql/EmbeddedMysqlTest.scala -> wix-embedded-mysql/src/test/scala/com/wix/mysql/EmbeddedMysqlTest.scal_
	modified:   wix-embedded-mysql/src/test/scala/com/wix/mysql/SupportedVersionsTest.scala
	modified:   wix-embedded-mysql/src/test/scala/com/wix/mysql/config/MysqldConfigTest.scala
 Date:      Mon Sep 14 14:55:38 2020 -0400

Changes to be committed:
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix8GTE19FileSetEmitter.java
Date:      Tue Sep 15 16:09:52 2020 -0400

Changes to be committed:
	modified:   pom.xml
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/Setup.java
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix8GTE19FileSetEmitter.java
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix8LTE17FileSetEmitter.java
	modified:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/setup/Mysql8Initializer.java
	new file:   wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/setup/NixGTE819Before8Initializer.java
	renamed:    wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/setup/NixBefore8Initializer.java -> wix-embedded-mysql/src/main/java/com/wix/mysql/distribution/setup/NixLTE818Before8Initializer.java
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants