dolt icon indicating copy to clipboard operation
dolt copied to clipboard

dolt sql `\commit` uses static time stamp

Open macneale4 opened this issue 1 year ago • 1 comments

Recorded timestamp on commits performed in sql shell with \commit appear to be the time that dolt sql was started.

lcl:~/Documents/data_dir_1/db5$ dolt sql
# Welcome to the DoltSQL shell.
# Statements must be terminated with ';'.
# "exit" or "quit" (or Ctrl-D) to exit. "\help" for help.
db5/main> select current_time;
+--------------+
| current_time |
+--------------+
| 14:54:27     |
+--------------+
1 row in set (0.00 sec)

db5/main> \commit --allow-empty -m "commit"
commit dkge3b16mapfocpf5iarbs2atduc337v (HEAD -> main)
Author: macneale <[email protected]>
Date:  Tue Oct 22 14:54:26 -0700 2024

        commit

db5/main> select current_time;
+--------------+
| current_time |
+--------------+
| 14:54:37     |
+--------------+
1 row in set (0.00 sec)

db5/main> \commit --allow-empty -m "commit again"
commit hvtpfojmdnraq3fhovhhujf8pukmsmnj (HEAD -> main)
Author: macneale <[email protected]>
Date:  Tue Oct 22 14:54:26 -0700 2024

        commit again

macneale4 avatar Oct 22 '24 21:10 macneale4

Also, doesn't seem to effect the stored procedure.

db5/main> call dolt_commit("--allow-empty","-m", "commit again");
+----------------------------------+
| hash                             |
+----------------------------------+
| fsqui9k22g6nhdlr41hga5niobh0ov6v |
+----------------------------------+
1 row in set (0.01 sec)

db5/main> \show
commit fsqui9k22g6nhdlr41hga5niobh0ov6v (HEAD -> main)
Author: root <root@localhost>
Date:  Tue Oct 22 15:14:34 -0700 2024

        commit again

db5/main> call dolt_commit("--allow-empty","-m", "commit again");
+----------------------------------+
| hash                             |
+----------------------------------+
| 57h9nhv4st28p18tbdjsvpnfl571vjhi |
+----------------------------------+
1 row in set (0.01 sec)

db5/main> \show
commit 57h9nhv4st28p18tbdjsvpnfl571vjhi (HEAD -> main)
Author: root <root@localhost>
Date:  Tue Oct 22 15:14:51 -0700 2024

        commit again

macneale4 avatar Oct 22 '24 22:10 macneale4