Giter Club home page Giter Club logo

Comments (8)

mscdex avatar mscdex commented on August 28, 2024

What does the table schema look like and at any point are any of the values in any of the columns null, empty, or anything special like that?

from mysql.

saschagehlich avatar saschagehlich commented on August 28, 2024

Give me a few hours to reproduce that ;)

from mysql.

saschagehlich avatar saschagehlich commented on August 28, 2024

http://gist.github.com/552473

This is the schema. And no, all of the columns have normal values, no NULL or empty strings or something like that

from mysql.

felixge avatar felixge commented on August 28, 2024

Can you quantify "sometimes"? Is it happening in regular intervals, if so how big are they? This sounds like it could get fairly tricky to reproduce on my end without further information, but I'll have a look.

from mysql.

piscisaureus avatar piscisaureus commented on August 28, 2024

I ran into this too. It occurs rarely but that makes me sweat even more.

Testcase at http://gist.github.com/583048

from mysql.

piscisaureus avatar piscisaureus commented on August 28, 2024

I think it happens when the end of a string value aligns exactly to the end of a buffer, then the entire buffer is used but the parser state doesn't advance to COLUMN_VALUE_LENGTH. This causes the parser to assign an empty string to the next field and assign subsequent values to the wrong column.

We don't see it that often because generally an entire row is received in one buffer, so only the end of the last column's value aligns to the end of the buffer, but then there are no 'next' columns to f*ck up.

Very simple patch: http://gist.github.com/583103

from mysql.

felixge avatar felixge commented on August 28, 2024

Excellent test case, analysis and patch! Thank you so much. I just incorporated your changes and pushed out v0.5.0 to npm! Let me know if this works for you.

from mysql.

piscisaureus avatar piscisaureus commented on August 28, 2024

Yup it does. Thanks

from 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.