dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Creating a tag at commit that already exists in databases list and then calling `use db/tag` overloads procedures

Open tbantle22 opened this issue 3 years ago • 1 comments

Repro:

mysql> show databases;
+-------------------------------------------+
| Database                                  |
+-------------------------------------------+
| information_schema                        |
| test                                      |
| test/9kp2re4irbrdiu20dlimjtekkuv7gcf3     |
| test/bttbgdfg21i0vj46cjpcvpcht7hdg9vc     |
| us_jails                                  |
| us_jails/asha5b6ut0cbaaouoo3pifle4dp3220g |
| us_jails/main                             |
+-------------------------------------------+
7 rows in set (0.04 sec)

mysql> use us_jails;
No connection. Trying to reconnect...
Connection id:    15
Current database: *** NONE ***

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> call dolt_tag("v1", "asha5b6ut0cbaaouoo3pifle4dp3220g");
+--------+
| status |
+--------+
|      0 |
+--------+
1 row in set (0.05 sec)

mysql> select * from dolt_status;
Empty set (0.04 sec)

mysql> use us_jails/v1;
Database changed
mysql> call dolt_checkout("main");
ERROR 1105 (HY000): overloaded stored procedure `dolt_add` may only have a single variant with `9223372036854775807` parameters

tbantle22 avatar Aug 05 '22 22:08 tbantle22

Dropping the database at the commit (ie. drop database us_jails/asha5b6ut0cbaaouoo3pifle4dp3220g) should be a suitable workaround if a customer runs into this.

timsehn avatar Aug 05 '22 22:08 timsehn