Giter VIP home page Giter VIP logo

mysql-binlog-events's Issues

Row_event_iterator unusable in for loop

EXAMPLE:

Row_event_set::iterator rows_itr = rowset.begin();
for (; rows_itr != rowset.end(); ++rows_itr) {
    // never reach here
    Row_of_fields rof(*rows_itr);
    std::cout << "\ncurrent row change:";
    //...
}

CAUSE:
Row_event_set::begin() & Row_event_set::end() returns nontrivially constructed and trivially constructed Row_event_iterator respectively.
However nontrivially constructed Row_event_iterator compares the same as trivially constructed one, making the first for loop exit directly as inequality test fails.
WORKAROUND:
Row_event_iterator is usable in do..while loop, as the first star operator call modifies its internal state and make it compare different from trivially constructed one.

Row_event_set::iterator rows_itr = rowset.begin();
do {
    Row_of_fields rof(*rows_itr);
    std::cout << "\ncurrent row change:";
    //...
} while (++rows_itr != rowset.end());

Compiling issues

Hi
I'm having issues compiling this library, did most what was told ,

root@redis06:~/jayme/mysql-binlog-events# cmake . -DMYSQLCLIENT_STATIC_LINKING:BOOL=TRUE
-- You will link statically to the MySQL client library (set with -DMYSQLCLIENT_STATIC_LINKING=<bool>)
-- Searching for static libraries with the base name(s) "libmysqlclient_r.a libmysqlclient.a"
-- mysql_config was found /usr/bin/mysql_config
-- MySQL client environment/cmake variables set that the user can override
--   MYSQL_DIR                   : /usr/lib/x86_64-linux-gnu
--   MYSQL_INCLUDE_DIR           : /usr/include/mysql
--   MYSQL_LIB_DIR               : /usr/lib/x86_64-linux-gnu
--   MYSQL_CONFIG_EXECUTABLE     : /usr/bin/mysql_config
--   MYSQL_CXX_LINKAGE           : 1
--   MYSQL_CFLAGS                : -I/usr/include/mysql
--   MYSQL_CXXFLAGS              : -I/usr/include/mysql
--   MYSQLCLIENT_STATIC_LINKING  : TRUE
--   MYSQLCLIENT_NO_THREADS      :
-- MySQL client optional environment/cmake variables set by the user
--   MYSQL_EXTRA_LIBRARIES       :
--   MYSQL_LINK_FLAGS            :
-- MySQL client settings that the user can't override
--   MYSQL_VERSION               : 5.7.19
--   MYSQL_NUM_VERSION           : 50719
--   MYSQL_LIB                   : /usr/lib/x86_64-linux-gnu/libmysqlclient.a
--   MYSQL_LIBRARIES             : /usr/lib/x86_64-linux-gnu/libmysqlclient.a;pthread;z;m;rt;dl;rt
-- Configuring done
-- Generating done
-- Build files have been written to: /root/jayme/mysql-binlog-events
root@redis06:~/jayme/mysql-binlog-events# echo $MYSQL_SOURCE_INCLUDE_DIR
/root/jayme/mysql-5.7.19/include
root@redis06:~/jayme/mysql-binlog-events# make
[ 20%] Built target binlogevents_static
[ 40%] Built target binlogevents_shared
[ 42%] Building CXX object bindings/src/CMakeFiles/replication_static.dir/access_method_factory.cpp.o
In file included from /root/jayme/mysql-binlog-events/bindings/include/field_iterator.h:20:0,
                 from /root/jayme/mysql-binlog-events/bindings/include/binlog.h:35,
                 from /root/jayme/mysql-binlog-events/bindings/include/tcp_driver.h:24,
                 from /root/jayme/mysql-binlog-events/bindings/src/access_method_factory.cpp:21:
/root/jayme/mysql-binlog-events/bindings/include/value.h:21:21: fatal error: my_time.h: No such file or directory
compilation terminated.
bindings/src/CMakeFiles/replication_static.dir/build.make:62: recipe for target 'bindings/src/CMakeFiles/replication_static.dir/access_method_factory.cpp.o' failed
make[2]: *** [bindings/src/CMakeFiles/replication_static.dir/access_method_factory.cpp.o] Error 1
CMakeFiles/Makefile2:217: recipe for target 'bindings/src/CMakeFiles/replication_static.dir/all' failed
make[1]: *** [bindings/src/CMakeFiles/replication_static.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

when trying to make I get an error that a certain mysql header file can't be found..
but it's in the MYSQL_SOURCE_INCLUDE_DIR folder,/root/jayme/mysql-5.7.19/include.. /root/jayme/mysql-5.7.19/include/my_time.h file exists

What should I adjust?
(As a fix I also tried doing export MYSQL_INCLUDE_DIR=/root/jayme/mysql-5.7.19/include" but that gave other compiler issues, as that expects the compiled version of mysql_version.h etc.

Thx!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.