Bug #64185 Crash using count combined with math operation
Submitted: 31 Jan 2012 17:21 Modified: 2 Feb 2012 15:25
Reporter: Matthias Maier Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.37 OS:Windows (XP SP3)
Assigned to: CPU Architecture:Any
Tags: add, count, divide, Math, multiply, substract

[31 Jan 2012 17:21] Matthias Maier
Description:
If COUNT(*) is used in combination with a math operation in most cases workbench will crash/close immediately without any error message.

How to repeat:
SELECT COUNT(*)/46 FROM test_table;
SELECT COUNT(*)*8 FROM test_table;
SELECT COUNT(*)+200 FROM test_table;
SELECT COUNT(*)-70 FROM test_table;

Suggested fix:
Calculate number of rows and then calculate result of math operation like it is done in command line client.
[31 Jan 2012 18:43] Valeriy Kravchuk
Thank you for the bug report. Verified just as described. Not repeatable on Mac OS X.
[2 Feb 2012 15:25] Juan Rene Ramirez Monarrez
The problem is the same as in bug #63940. Fix to be available in 5.2.38