Menu

#3024 (ok 3.3.4) not all data being shown / counted

3.3.3
fixed
1
2013-06-11
2010-04-13
SimonC
No

ok no idea when this was introduced but if i run an sql statement with a fixed number in the first column, then i only get the first 30 rows (as expected) but it also tells me that there are only 30 rows in total when there should be over 4500. This means that if i then run the SQL with SUM() on fields there data totals are incorrect.

runs incorrectly
SELECT -95 stock_id, "Carriage" stock_model,
IF( kpim.eod_period = "2010-03", kpim.carrier_net, 0 ) 03_carriage
FROM bob_outbound_kpi_master kpim
WHERE kpim.eod_period = "2010-03"

runs fine
SELECT "-95" stock_id, "Carriage" stock_model,
IF( kpim.eod_period = "2010-03", kpim.carrier_net, 0 ) 03_carriage
FROM bob_outbound_kpi_master kpim
WHERE kpim.eod_period = "2010-03"

Discussion

  • Philip Frank

    Philip Frank - 2010-04-20

    I can reproduce this.

    This is the most simple query that emits wrong result counts:
    SELECT 1 somealias FROM test WHERE blub = 1

    These variations work correctly:
    SELECT 1 AS somealias FROM test WHERE blub = 1 /* Didn't ommit AS keyword */
    SELECT 1 somealias FROM test /* No where clause */
    SELECT "1" somealias FROM test WHERE blub = 1 /* string instead of integer literal */

     
  • Marc Delisle

    Marc Delisle - 2010-05-30
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2010-05-30

    This bug was fixed in repository and will be part of a future release; thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2010-05-30
    • milestone: --> 3.3.3
    • priority: 5 --> 1
    • summary: not all data being shown / counted --> (ok 3.3.4) not all data being shown / counted
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2010-06-28
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB