Conversation
|
To be honest, it is hard to review due to lots of code style changes. I would extract them into a separate commit(s). |
|
@Totktonada, reverted code style changes |
|
@ParshinPavel, we are fixed CI in a master. Could you rebase your patch? |
|
@ligurio, done |
|
@ParshinPavel I still see changes for Travis in your patch - https://patch-diff.githubusercontent.com/raw/tarantool/libslave/pull/13.patch And GH also warns about conflicts in this PR (see at the bottom of PR page). |
|
@ligurio , i have no idea why github generates patch including all commits. If you open tab "Files changed", you see the real diff. If you wish, I can just squash all commits and force push |
|
@ParshinPavel perhaps that happens because you did a merge and not a rebase: see commits in your own branch - https://github.com/ParshinPavel/libslave/commits/support-mysql8 You should drop your travis-related commits from a branch and then push updated commits with |
5c10617 to
3b9d523
Compare
3b9d523 to
712f6f6
Compare
|
Hope it's better now |
There was a problem hiding this comment.
It is definitely better, thank you!
I have some comments regarding your changes. Please check them inline and below:
- You have mixed several changes in a single commit (formatting changes in
.travis.ymlandCMakeLists.txt, changes in a build infrastructure and changes related to support of Percona 8). It's a bad practice. I would ask you to split changes for a several commits and probably remove formatting changes when you don't need to change code (although it's up to you). - You have bumped a submodule version to a branch with 8th version. I'm not sure it's a good idea. I would ask you to stick module to a fixed tag or commit to have predictable result each time when we will rebuild library.
We can stick it to a commit of a latest tag in 8th series:
$ git tag | grep Percona-Server-8.0 | tail -1
Percona-Server-8.0.20-11
$ git rev-list -n 1 Percona-Server-8.0.20-11
5b5a5d2584af8e47a66248218be0288164a69cb7
.travis.yml
Outdated
| before_script: | ||
| - mkdir build | ||
| - cd build | ||
| - cmake -DCMAKE_BUILD_TYPE=Release .. |
There was a problem hiding this comment.
This change is not related to PR with Percona 8 support. Please remove it.
|
This raises the question: can we support different mysql versions in future? How about mariadb? Can we support different versions in one build with appropriate runtime checks? |
MariaDB has incompatible replication protocol [1]. It was never supported in libslave. If you (or any user) wants MariaDB support |
| char buffer[ value_length ]; | ||
|
|
||
| if (::decimal2string(&dec, (char*)&buffer, &value_length, zerofill ? precision : 0, scale, '0') != E_DEC_OK) { | ||
| if (::decimal2string(&dec, (char*)&buffer, &value_length, zerofill ? precision : 0, scale) != E_DEC_OK) { |
There was a problem hiding this comment.
There are at least two supported versions of MySQL: 5.7 and 8.0 [1] [2]. This change will add compatibility with 8.x and will broke compatibility with 5.7. Perhaps we need to introduce a compilation flag (for example MYSQL57, MYSQL80) and pass it to cmake before a build.
| -DWITH_CLIENT_PROTOCOL_TRACING=0 | ||
| -DWITH_DEFAULT_FEATURE_SET=0 | ||
| -DWITH_SSL=bundled | ||
| -DWITH_SSL=system |
There was a problem hiding this comment.
What are the reasons to change it?
| mysql_client_build | ||
| WORKING_DIRECTORY ${MYSQL_BIN} | ||
| DEPENDS binlogevents_build | ||
| COMMAND ${CMAKE_COMMAND} --build . --target perconaserverclient |
There was a problem hiding this comment.
It seems it's a formatting change and it is not related to Percona 8 support. Please remove it.
| # Most probably static mysql is built without fPIC, so, we can't build dynamic library with it | ||
| ADD_LIBRARY (slave ${LINK_TYPE} ${SRC}) | ||
| TARGET_LINK_LIBRARIES (slave ${MYSQL_LIBS} -lpthread) | ||
| TARGET_LINK_LIBRARIES (slave PUBLIC libmysql ssl crypto Threads::Threads m rt dl) |
There was a problem hiding this comment.
What are the reasons to remove MYSQL_LIBS here?
| START_5_7_ENCRYPTION_EVENT = 159, | ||
|
|
||
| MARIA_EVENTS_BEGIN = 160, | ||
|
|
There was a problem hiding this comment.
libslave has a unit test (test/unit_test.cpp) that covers different types of events. It would be good to add new testcases for a new event types.
| case VIEW_CHANGE_EVENT: | ||
| case XA_PREPARE_LOG_EVENT: | ||
| case PARTIAL_UPDATE_ROWS_EVENT: | ||
| case START_5_7_ENCRYPTION_EVENT: |
There was a problem hiding this comment.
Looks like event MYSQL_END_EVENT added to slave_log_event.h is missed here.
07ebc98 to
712f6f6
Compare

This MR updates mysql submodule, fixes some compilation/linking errors