SELECT Mysql with wrong result

-2

Let's take the table below as an example:

id  empresa  forneedor
    1   10       105
    2   10       102
    3   10       105
    4   10       112
    5   10       105

Using business and vendor as indexes.

Making SELECT * FROM table WHERE empresa = 10; - > returns 5 rows which is expected.

Making SELECT * from table WHERE fornecedor = 105; - > returns 3 rows which is expected.

Making SELECT * from table WHERE empresa = 10 AND fornecedor = 105; - > returns only 1 row, not result expected.

The table is in the INNODB format

I already used the OTPIMIZE TABLE command, but it did not solve.

Does anyone have any idea where the problem is?

I have already detected that the problem is occurring with partitioned tables and index_merge. I think it's a problem similar to this link .

    
asked by anonymous 14.10.2015 / 22:27

1 answer

1

Problem solved.

Updated the version of MySQL to 5.6.19 (was 5.5.?).

Problem with partitioned table and multiple indexes. More information here link

Thank you to those who have tried to help.

    
15.10.2015 / 19:44