Closed proby closed 4 years ago
Hmm, no dice. There's a lot of database version-specific stuff in here, do you know the exact database server version(s)?
Yup, no go. Time to go down to the db level. Currently I'm using mariadb: stable 10.4.13 (bottled)
installed via Homebrew.
$ mysqld --version
mysqld Ver 10.4.13-MariaDB-log for osx10.15 on x86_64 (Homebrew)
$ mysql --version
mysql Ver 15.1 Distrib 10.4.13-MariaDB, for osx10.15 (x86_64) using readline 5.1
I'll try mucking around later this evening.
My local machine is running version 2.2
of ks
while the other is still on 1.17
.
From USAGE.md:
To use the SSH transport you need to install Kitchen Sync on a machine that you can SSH to at the source datacentre. For current versions of Kitchen Sync you should always install the same version as you will have at the other end (the protocol is versioned to allow forward compatibility, but that level of cross-compatibility isn't being maintained in these early releases).
From INSTALL.md:
in particular forward & backwards compatibility with other versions (ie. when syncing against another server's install of Kitchen Sync using the --via option) is not guaranteed.
That's looking to be, at a mimimum, a contributing factor to my issues.
Yeah that could be something to do with it eh.
There must be something else as well, as your pull request would have picked that up - test/Dockerfile-sync-v1 tries a v1.17 -> current sync and it uses that sql test file.
The other possibility is something to do with your client library not matching the server, but that shouldn't matter - I only check the server version to determine what the right schema parsing code to use is.
I'll actually change those comments too as I do try to maintain compatibility now - thanks for highlighting those.
Oh, the INSTALL.md notes are specific to using the unreleased master
branch. I'll just change USAGE.md then.
Ah. You have MariaDB 10.4 at the local end. What about at the 'from' end, where you're still running v1.17 - is that 10.4 too?
Made some progress this evening.
First, came across a new error, was able to figure some things about it. That's all recorded in #82.
I'm starting to believe this error (Invalid default value
) has to do with the underlying libraries that are used when building ks
.
If I install kitchen-sync v2.2
via homebrew (brew install kitchen-sync
) I get the above error.
If I build and install kitchen-sync v2.2
from source I get the scenairo/error descrbed in #82.
The local build and install was accomplished via these steps:
git checkout v2.2
cd build
cmake .. && make && make install
as described in https://github.com/willbryant/kitchen_sync/blob/master/INSTALL.md#macos. I did not perform brew install mariadb-connector-c
.
Thanks, that was enough to reproduce it. It is indeed a problem with using the mysql version of the client library together with the mariadb version of the server, and it does the same thing on Linux so I can repro in a dockerfile (https://travis-ci.com/github/willbryant/kitchen_sync/builds/166887210).
It looks like the server version is being reported back to the mysql version of the client as 50505 (ie. 5.5!) so the version checks aren't working.
Let's convert to an issue now we know the circumstances
Caused by the hack described in https://github.com/google/mysql/blob/master/include/mysql_com.h#L40 ~so it's even more specific, only if you have an older version of the mysql client library~ which is only present in some versions/forks.
Now that we (well mainly @willbryant) have a better idea of what's going on I'm closing this and have opened #83.
Thanks for your help on this one, it was invaluable!
After upgrading to the newest version of
ks
I got the following error when attempting a sync:That particular column is defined as:
I mucked with some tests to hopefully get a test failure. I was unable to get a failed build using the more basic unit test. So I'm pushing this to see if the full test suite will result in a failure or if I have other local issue.