2014-10-23 10:52:21 -04:00
|
|
|
var common = require('../../common');
|
|
|
|
var connection = common.createConnection();
|
|
|
|
var assert = require('assert');
|
|
|
|
|
|
|
|
var rows = undefined;
|
|
|
|
|
|
|
|
connection.execute('SELECT TIMESTAMP(0000-00-00) t', [], function(err, _rows, _fields) {
|
|
|
|
if (err) throw err;
|
|
|
|
rows = _rows;
|
2015-01-28 15:33:44 -05:00
|
|
|
connection.end();
|
2014-10-23 10:52:21 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
function isInvalidTime(t) {
|
|
|
|
return isNaN(t.getTime());
|
|
|
|
}
|
|
|
|
|
|
|
|
process.on('exit', function() {
|
|
|
|
assert.deepEqual(Object.prototype.toString.call(rows[0].t), "[object Date]");
|
|
|
|
assert.deepEqual(isInvalidTime(rows[0].t), true);
|
|
|
|
});
|