Giter Club home page Giter Club logo

Comments (11)

rbock avatar rbock commented on August 23, 2024

That is a surprise! I will need a few days to look into that.

It would be great if you could provide a pull request with a test that demonstrates the current failure.

from sqlpp11-connector-mysql.

WopsS avatar WopsS commented on August 23, 2024

I forgot to add the response, I added 1 test with 3 cases (see #40), first 2 should pass and the last one should fail.

from sqlpp11-connector-mysql.

rbock avatar rbock commented on August 23, 2024

Thanks a lot!

from sqlpp11-connector-mysql.

WopsS avatar WopsS commented on August 23, 2024

No problem :)

from sqlpp11-connector-mysql.

rbock avatar rbock commented on August 23, 2024

Good news: I can reproduce the effect on my local machine.

from sqlpp11-connector-mysql.

WopsS avatar WopsS commented on August 23, 2024

Nice! <3

from sqlpp11-connector-mysql.

rbock avatar rbock commented on August 23, 2024

After playing around with this a bit, I tend to consider this a bug in the client library.

Using mysql, after calling mysql_stmt_fetch, if there is data, then stmt->state == MYSQL_STMT_FETCH_DONE regardless of whether data is truncated or not.

Using the mariadb connector, if there is

  • non-truncated data, then stmt->state == MYSQL_STMT_USER_FETCHING
  • truncated data then
    • if there was non-truncated data in the call before, then stmt->state == MYSQL_STMT_USER_FETCHING
    • if it is the first row, then stmt->state == MYSQL_STMT_USE_OR_STORE_CALLED

The latter is an invalid state for calling mysql_stmt_fetch_column (looking at the source code).

Maybe you can double check and file an issue for the connector library, in case you come to the same conclusion?

from sqlpp11-connector-mysql.

WopsS avatar WopsS commented on August 23, 2024

Sure, I will do that and let you know. I will need few days to do it, I am a little bit busy this week.

from sqlpp11-connector-mysql.

WopsS avatar WopsS commented on August 23, 2024

I played around with it too and it is as you said.

When I use MySQL _handle->mysql_stmt->state == MYSQL_STMT_FETCH_DONE even if data is truncated or not.

When using MariaDB

  • if data is not truncated _handle->mysql_stmt->state == MYSQL_STMT_USER_FETCHING, also when there was non-truncated data before.
  • if first row has truncated data _handle->mysql_stmt->state == MYSQL_STMT_USE_OR_STORE_CALLED.

I created a bug report on MariaDB Connector/C bug tracker (https://jira.mariadb.org/browse/CONC-354).

from sqlpp11-connector-mysql.

rbock avatar rbock commented on August 23, 2024

Thanks for testing and the bug report!

from sqlpp11-connector-mysql.

WopsS avatar WopsS commented on August 23, 2024

No problem :)

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.