Details
Description
create table t1 (i int); insert into t1 values (1);
ANALYZE SELECT ... INTO @var will not set @var:
analyze select * from t1 into @var; +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra | +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------+ | 1 | SIMPLE | t1 | ALL | NULL | NULL | NULL | NULL | 1 | 1 | 100.00 | 100.00 | | +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------+ 1 row in set (0.00 sec) MariaDB [j14]> select @var; +------+ | @var | +------+ | NULL | +------+ 1 row in set (0.00 sec)
If we assume that ANALYZE $stmt should make the action specified by $stmt, then @var should be set.
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-406 ANALYZE $stmt
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Internally, it is clear - ANALYZE code captures and discards the output. Maybe, it should detect outputs that don't send to the client (like. select_dumpvar) and let them still capture the output.