Bug #83235 mysqlsh arrow-up removes semicolon from previous command
Submitted: 1 Oct 2016 20:22 Modified: 3 Oct 2016 7:23
Reporter: Kenny Gryp Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Document Store: MySQL Shell Severity:S3 (Non-critical)
Version:5.7.15-labs-gr090-log OS:Any
Assigned to: CPU Architecture:Any

[1 Oct 2016 20:22] Kenny Gryp
Description:
In the mysqlsh, using arrow-up to execute the previous command removes semicolon from previous command.

This requires you to add ; all the time...

How to repeat:

### Regular Shell:

mysql2 mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 0ec26995-880c-11e6-b615-08002718d305 | barbara     | 3306        | ONLINE       |
| group_replication_applier | 3d36134b-87ef-11e6-93be-08002718d305 | wilhelmine  | 3306        | ONLINE       |
| group_replication_applier | 5166ecd3-880b-11e6-9971-08002718d305 | heloise     | 3306        | ONLINE       |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
3 rows in set (0.00 sec)

mysql2 mysql> 

<<< PRESS ARROW UP >>>

mysql2 mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 0ec26995-880c-11e6-b615-08002718d305 | barbara     | 3306        | ONLINE       |
| group_replication_applier | 3d36134b-87ef-11e6-93be-08002718d305 | wilhelmine  | 3306        | ONLINE       |
| group_replication_applier | 5166ecd3-880b-11e6-9971-08002718d305 | heloise     | 3306        | ONLINE       |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
3 rows in set (0.00 sec)

This works. the semicolon is there! and I can just press enter and run the same command again

### In mysqlsh>

mysql-sql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 0ec26995-880c-11e6-b615-08002718d305 | barbara     | 3306        | ONLINE       |
| group_replication_applier | 3d36134b-87ef-11e6-93be-08002718d305 | wilhelmine  | 3306        | ONLINE       |
| group_replication_applier | 5166ecd3-880b-11e6-9971-08002718d305 | heloise     | 3306        | ONLINE       |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
3 rows in set (0.00 sec)

mysql-sql>

<<< PRESS ARROW UP >>>

mysql-sql> SELECT * FROM performance_schema.replication_group_members
       ... 
       ... ^^^ semicolumn is gone :( 

Suggested fix:
As chairman of the running-'SHOW SLAVE STATUS\G'-in-a-loop-guild, I would like to see the traditional mysql> behaviour where I can just press arrow-up and the semicolon will still be there, so I can quickly press enter and repeat indefinitely (or \G if I provided that, but that's not implemented yet)
[3 Oct 2016 7:23] MySQL Verification Team
Hello Kenny,

Thank you for the report and feedback.
Verified as described.

Thanks,
Umesh