Skip to content

Fix handling for several SQL types on both RX/TX + add connection pools#78

Open
noamw wants to merge 12 commits into
sidorares:masterfrom
noamw:master
Open

Fix handling for several SQL types on both RX/TX + add connection pools#78
noamw wants to merge 12 commits into
sidorares:masterfrom
noamw:master

Conversation

@noamw

@noamw noamw commented Jun 10, 2013

Copy link
Copy Markdown

Fix handling of Date objects, un/signed integers and binary buffers + adaptation of node-mysql pool

@sidorares

Copy link
Copy Markdown
Owner

Thanks! Can you make tests work as part of this PR? (I know they were broken before it, but still it's very uncomfortable to check PR's with failing tests)

@noamw

noamw commented Jun 16, 2013

Copy link
Copy Markdown
Author

Unfortunately, I cannot dive into making the current test suite work.
I've created a snippet gist in https://gist.github.com/noamw/5792691, showing the tests I've run to (which uncovered some of the current shortcomings of mysql-native, and validated the fixes).
I've run the same tests on mysql2, and it would seem that at this point it shares the same pitfalls my fork attempts to fix.

@sidorares

Copy link
Copy Markdown
Owner

thanks, I like your tests. I'll try to add it to mysql-native and mysql2. Note that you are testing only LONGLONG type against different values in your int tests - CAST(1 AS SIGNED) and CAST(9223372036854775807 as SIGNED) are both serialized as LONGLONG type ( as string in text protocol or 8 bytes int in binary protocol).

@sidorares

Copy link
Copy Markdown
Owner

also, big numbers tests don't actually check truncation as in javascript 18446744073709551615 === 18446744073709552000 is true. You need to keep input values as strings or bugnumber objects and compare results as strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants