Coder Social home page Coder Social logo

Comments (7)

jiiijkkk avatar jiiijkkk commented on August 25, 2024

There is my schema:


CREATE TABLE IF NOT EXISTS `tab` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `b` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `c` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
  `d` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `e` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `f` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `g` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `h` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `i` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `j` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `k` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `l` tinyint(1) NOT NULL COMMENT 'ffff',
  `m` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `analyze` (`f`,`timestamp`),
  KEY `independency` (`f`(4)),
  KEY `f` (`group_id`),
  KEY `guest_service` (`a`,`c`(8),`f`(4))
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

and there is the sql:

SELECT `c`, `k`  FROM `tab`  WHERE TIME_TO_SEC(TIMEDIFF(NOW(), `k`)) > 70  AND `b` = BINARY "abcdef" AND `c` = "L3lqVaqXbaJb9TFHH75B"

from node-mysql2.

sidorares avatar sidorares commented on August 25, 2024

thanks, I'll try to reproduce

from node-mysql2.

sidorares avatar sidorares commented on August 25, 2024

Are you sure there is no typo here:

pool.getConnection(function(err, connection){
            if ( err ) {
                log(3, '[Pool][getConnection][Error] sql: ' + sql + ' err: ' + err);
                connection.release();
                selectCb(err);
                return;
            }

// you are getting "connection" from pool but using db
           db.query(sql, function dbQuery(err, rows, fields){

from node-mysql2.

jiiijkkk avatar jiiijkkk commented on August 25, 2024

Yes. It's connection. They were 'db' in my original code. I thought you might use 'connection' much well so I change that. I miss.

from node-mysql2.

sidorares avatar sidorares commented on August 25, 2024

could be difficult to debug, it works just fine in simple example. Are you getting any errors before there is no call to callback?

from node-mysql2.

jiiijkkk avatar jiiijkkk commented on August 25, 2024

There are no error or unexpection caught even from kernel or other modules.
But we try [email protected] with the same code it work fine til now.
The NodeJS version is v0.10.21. Hoping it will be helpful.

from node-mysql2.

sidorares avatar sidorares commented on August 25, 2024

Could you try again from master? #70 should make pool behaviour consistent with node-mysql

from node-mysql2.

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.