MySQL [default]> select rand() union all select rand();
+--------------------+
| rand() |
+--------------------+
| 0.3574665331446355 |
| 0.6134769079254957 |
+--------------------+
2 rows in set (0.00 sec)
MySQL [default]> select rand() union all select rand();
ERROR 2013 (HY000): Lost connection to MySQL server during query
MySQL [default]> select rand() union all select rand();
ERROR 2006 (HY000): MySQL server has gone away
The mogosqld logs:
2021-04-29T14:31:14.159+0800 D REWRITER [conn1] rewritten query: `select rand() as rand() from DUAL union all select rand() as rand() from DUAL`
2021-04-29T14:31:14.159+0800 W OPTIMIZER [conn1] error running FoldConstants: expected EvalType 12 at index 0, but got fa
2021-04-29T14:31:14.159+0800 W OPTIMIZER [conn1] error running FoldConstants: expected EvalType 12 at index 0, but got fa
2021-04-29T14:31:14.159+0800 D OPTIMIZER [conn1] plan before pipeline optimization:
↳ Project(rand()):
↳ Union (all):
↳ Project(rand()):
↳ Dual
↳ Project(rand()):
↳ Dual
2021-04-29T14:31:14.159+0800 D OPTIMIZER [conn1] plan after pipeline optimization:
↳ Project(rand()):
↳ Union (all):
↳ Project(rand()):
↳ Dual
↳ Project(rand()):
↳ Dual
2021-04-29T14:31:14.159+0800 D EXECUTOR [conn1] executing query plan:
↳ Project(rand()):
↳ Union (all):
↳ Project(rand()):
↳ Dual
↳ Project(rand()):
↳ Dual
2021-04-29T14:31:14.159+0800 I NETWORK [conn1] returned 2 rows (46B)
2021-04-29T14:31:14.159+0800 D NETWORK [conn1] 44B peak allocated
2021-04-29T14:31:14.159+0800 I NETWORK [conn1] done executing query in 1ms
fatal error: concurrent map writes
The
mogosqld
logs: