mediumint

164 views
Skip to first unread message

Andreas Nyhrén

unread,
Dec 5, 2012, 5:09:37 AM12/5/12
to node-mys...@googlegroups.com
trying to output data with mysql datatype mediumint fails with message _not_implemented_ MYSQL_TYPE_INT24 and a dump of rowdata(?)

should one just avoid mediumint meanwhile and are there any plans of implementing support for it?

any other datatypes that should be avoided?

cheers!

Andreas

Andrey Sidorov

unread,
Dec 5, 2012, 7:03:39 AM12/5/12
to node-mys...@googlegroups.com
Hi Andreas,

de-serialising code is in lib/mysql-native/serializers/reader.js

You can
1) use non-binary protocol ( query() instead of execute() ) - prepared
statement result uses binary protocol and requires each field type to
be deserialized accordingly while non-binary query() result returned
as string regardless of field type.

or
2) add support for mediumint
- create test
- write de-serealizer (it's probably 3 bytes int, but could be 4
bytes) - double-check what you receive with test query
- create pull request

Let me know if you decide for 2) and need any help

Cheers,
Andrey
Reply all
Reply to author
Forward
0 new messages