Giter Club home page Giter Club logo

Comments (8)

rbock avatar rbock commented on July 21, 2024

Hi,

You could just use mariadb. On the systems that I know that use mariadb, there are libmysql* symbolic links. If those are not present on your system, maybe you could extend the FindMySql.cmake file and create a pull request? That would be great!

As for the Windows part: For quite some time I could not get libmysql to link with anything I built on appveyor. I was experimenting with mariadb and had compilation problems. I reported a few bugs and gave up. Some of this seems to be fixed now as the appveyor builds complete successfully but it is certainly not in a very good state.

from sqlpp11-connector-mysql.

lgong30 avatar lgong30 commented on July 21, 2024

I have tried, everything went well except for the second test, i.e., SampleTest. The
second test failed while reallocating buffer, the following gives the detail:

2: MySQL debug: Preparing: 'SELECT tab_sample.alpha,tab_sample.beta,tab_sample.gamma FROM tab_sample WHERE (((tab_sample.alpha<>?) AND (tab_sample.beta<>?)) AND (tab_sample.gamma<>?))'
2: MySQL debug: Constructing prepared_statement, using handle at 0x20628d0
2: MySQL debug: binding integral parameter 7 at index: 0, being not null
2: MySQL debug: binding text parameter wurzelbrunft at index: 1, being not null
2: MySQL debug: binding boolean parameter true at index: 2, being not null
2: MySQL debug: Executing prepared_statement
2: MySQL debug: Constructing bind result, using handle at 0x20628d0
2: MySQL debug: binding integral result 0 at index: 0
2: MySQL debug: binding text result at index: 1
2: MySQL debug: binding boolean result
2: at index: 2
2: MySQL debug: Binding results for handle at 0x20628d0
2: MySQL debug: Accessing next row of handle at 0x20628d0
2: MySQL debug: Need to reallocate buffer at index 1 for handle at 0x20628d0
2: Exception: MySQL: Fetch column after reallocate failed:
2/6 Test #2: SampleTest .......................***Failed 0.23 sec

It seems that this exception is thrown by bool bind_result_t::next_impl() in bind_result.cpp.

Do you have any hint for me to solve it?

Thanks!
-- Long

from sqlpp11-connector-mysql.

rbock avatar rbock commented on July 21, 2024

Hmm, that looks strange.

Can you try to dig deeper into the problem by printing r.bound_len, param.buffer_length and the actual return value of mysql_stmt_fetch_column?

Thanks,

Roland

from sqlpp11-connector-mysql.

lgong30 avatar lgong30 commented on July 21, 2024

After a deeper dig, I got the following mysql error code:

Error: 2051 (CR_NO_DATA)
Message: Attempt to read column without prior row fetch

Original exception output is:

Exception: MySQL: Fetch column after reallocate failed: 2051

To get the above output, I changed mysql_stmt_error to mysql_stmt_errno in bind_result.cpp, since
I got nothing (empty string) from mysql_stmt_error.

Thanks!

  • Long

from sqlpp11-connector-mysql.

rbock avatar rbock commented on July 21, 2024

Please try again with the new version on develop. It does not change anything functionally but prints a few more messages.

Which library are you using? mysql or mariadb, which version?

from sqlpp11-connector-mysql.

lgong30 avatar lgong30 commented on July 21, 2024

My mysql server version is: mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper
For the connector, I used mariadb client (3.0.2) instead of mysqlclient.

The following is exception thrown when running ctest on the new version on develop.

2: Exception: MySQL: Fetch column after reallocate failed: error-code: 1, stmt-error: , stmt-errno: 2051

from sqlpp11-connector-mysql.

rbock avatar rbock commented on July 21, 2024

Thanks. I'll need some time to setup mariadb.

from sqlpp11-connector-mysql.

rbock avatar rbock commented on July 21, 2024

See #39 (it is a maria db client bug it seems).

Closing this one.

from sqlpp11-connector-mysql.

Related Issues (20)

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.