dble icon indicating copy to clipboard operation
dble copied to clipboard

The result is not stable on `select syntax` when it contains `limit` but no `order`

Open FlyingMao opened this issue 7 years ago • 0 comments

steps:

mysql> select HEX(R_bit) like (select 1) from test_shard;
+--------------------------------+
| HEX(R_bit) LIKE (
	SELECT 1
	) |
+--------------------------------+
|                              1 |
|                              0 |
|                              0 |
|                              0 |
+--------------------------------+
4 rows in set (0.01 sec)

mysql> select HEX(R_bit) like (select 1) from test_shard limit 1
    -> ;
+----------------------------------+
| HEX(R_bit) LIKE (
		SELECT 1
		) |
+----------------------------------+
|                                0 |
+----------------------------------+
1 row in set (0.01 sec)

mysql> select HEX(R_bit) like (select 1) from test_shard limit 1;
+----------------------------------+
| HEX(R_bit) LIKE (
		SELECT 1
		) |
+----------------------------------+
|                                1 |
+----------------------------------+
1 row in set (0.00 sec)


FlyingMao avatar Jan 24 '18 08:01 FlyingMao