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
Using the latest snapshot of txMySQL.
Table Schema:
CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(30) NOT NULL DEFAULT '', `credit` mediumint(8) unsigned NOT NULL DEFAULT '0', `class` tinyint(2) unsigned NOT NULL DEFAULT '0', `first_usage` int(10) unsigned NOT NULL DEFAULT '0', `last_usage` int(10) unsigned NOT NULL DEFAULT '0', `enabled` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `idx_uc` (`user`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
Test Data:
INSERT INTO `users` (`id`,`user`,`credit`,`class`,`first_usage`,`last_usage`,`enabled`) VALUES (1,'foo',1000000,10,1312417862,0,0);
Expected Results:
Running: d = conn.runQuery("SELECT id, user, credit, class, first_usage, last_usage, enabled FROM users") Yields: [[256, '', 7037701, 112, 1111519090, 1175060495, 232]] - Incorrect
Running: d = conn.runQuery("SELECT id, user, credit, first_usage, last_usage, enabled FROM users") Yields: [[1, ''foo', 1000000, 971523584, 78, 0]] - Incorrect
Running: d = conn.runQuery("SELECT first_usage, last_usage, enabled, id, user, credit FROM users") Yields: [[1312417862, 0, 0, 1, 'foo', 1000000]] - Correct
Running: d = conn.runQuery("SELECT credit, class FROM users") Yields: [[1000000, 0]] - Incorrect
Running: d = conn.runQuery("SELECT class, credit FROM users") Yields:[[10, 1000000]] - Correct
Issue is possibly related to the mediumint datatype used in the class column.
//EDIT
For testing sake, I changed all the tinyints/mediumints to ints and still not getting the correct results.
CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(30) NOT NULL DEFAULT '', `credit` int(10) unsigned NOT NULL DEFAULT '0', `class` int(2) unsigned NOT NULL DEFAULT '0', `first_usage` int(10) unsigned NOT NULL DEFAULT '0', `last_usage` int(10) unsigned NOT NULL DEFAULT '0', `enabled` int(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `idx_uc` (`user`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
Running: d = conn.runQuery("SELECT id, user, class, credit, first_usage, last_usage, enabled FROM users") Yields: [[256, '', 1886085893, 683890, 1111490560, 3896901647L, 20025]] - Incorrect
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using the latest snapshot of txMySQL.
Table Schema:
Test Data:
Expected Results:
Running: d = conn.runQuery("SELECT id, user, credit, class, first_usage, last_usage, enabled FROM users")
Yields: [[256, '', 7037701, 112, 1111519090, 1175060495, 232]] - Incorrect
Running: d = conn.runQuery("SELECT id, user, credit, first_usage, last_usage, enabled FROM users")
Yields: [[1, ''foo', 1000000, 971523584, 78, 0]] - Incorrect
Running: d = conn.runQuery("SELECT first_usage, last_usage, enabled, id, user, credit FROM users")
Yields: [[1312417862, 0, 0, 1, 'foo', 1000000]] - Correct
Running: d = conn.runQuery("SELECT credit, class FROM users")
Yields: [[1000000, 0]] - Incorrect
Running: d = conn.runQuery("SELECT class, credit FROM users")
Yields:[[10, 1000000]] - Correct
Issue is possibly related to the mediumint datatype used in the class column.
//EDIT
For testing sake, I changed all the tinyints/mediumints to ints and still not getting the correct results.
Table Schema:
Expected Results:
Running: d = conn.runQuery("SELECT id, user, class, credit, first_usage, last_usage, enabled FROM users")
Yields: [[256, '', 1886085893, 683890, 1111490560, 3896901647L, 20025]] - Incorrect
The text was updated successfully, but these errors were encountered: