Comment 11 for bug 1405155

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

No, its not in upstream. Unable to reproduce with MySQL 5.5.40.

nilnandan.joshi@bm-support01:~$ mysql -uroot -p --socket=/tmp/mysql_sandbox5540.sock
Warning: Using unique option prefix pass instead of password is deprecated and will be removed in a future release. Please use the full name instead.
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.40 MySQL Community Server (GPL)

Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> select count(*) from goods_comments;
+----------+
| count(*) |
+----------+
| 2686398 |
+----------+
1 row in set (1.71 sec)

mysql> SELECT id, user_id FROM goods_comments WHERE user_id=197827 AND id=5273769;
+---------+---------+
| id | user_id |
+---------+---------+
| 5273769 | 197827 |
+---------+---------+
1 row in set (0.00 sec)

mysql> explain SELECT id, user_id FROM goods_comments WHERE user_id=197827 AND id=5273769;
+----+-------------+----------------+------+---------------------------------------------+----------+---------+-------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+----------------+------+---------------------------------------------+----------+---------+-------+------+-------------+
| 1 | SIMPLE | goods_comments | ref | id_index,user_id_index,user_id_status_index | id_index | 4 | const | 8 | Using where |
+----+-------------+----------------+------+---------------------------------------------+----------+---------+-------+------+-------------+
1 row in set (0.00 sec)

mysql>