We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try to read floats I get:
connected building query select * from float_test result { insert_id: undefined, affected_rows: undefined, rows: [ { id: 1, fval: '_not_implemented_ MYSQL_TYPE_FLOAT \'\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000¶ó�?\'' }, { id: 2, fval: '_not_implemented_ MYSQL_TYPE_FLOAT \'\\u0000\\u0000\\u0002\\u0000\\u0000\\u0000{\\u0014\\u0016@\'' } ] }
when using the program:
var my = require("mysql-native"); var db = my.createTCPClient("172.27.1.40", 3306); db.auto_prepare = true; db.auth("test", "chris", "passwd"); db.addListener('connect', function() { console.info("connected"); var q = buildQuery("select * from float_test"); q(db, [], function(err, result) { if (err) console.log("err", err); if (result) console.log("result", result); }); }); function buildQuery(sql, debug) { console.log("building query", sql); return function(db, data, callback) { //console.log("executing query", sql, data); var query = db.execute(sql, data); query.on('error', function(err) { console.warn("error", JSON.stringify(err), sql, data); callback(err); }); query.on('result', function(result) { //console.info("result", result); callback(null, result); }); } }
with data that looks like:
mysql> select * from float_test; +----+-------+ | id | fval | +----+-------+ | 1 | 1.234 | | 2 | 2.345 | +----+-------+ 2 rows in set (0.00 sec) mysql> describe float_test; +-------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | fval | float | NO | | 0 | | +-------+---------+------+-----+---------+----------------+ 2 rows in set (0.00 sec)
The text was updated successfully, but these errors were encountered:
Merge pull request #71 from chrisdew/master
b2a0c8b
#69 test and fix reading float in non-zero position
No branches or pull requests
When I try to read floats I get:
when using the program:
with data that looks like:
The text was updated successfully, but these errors were encountered: