dolt icon indicating copy to clipboard operation
dolt copied to clipboard

`SHOW PROCEDURE STATUS` is always current time

Open jycor opened this issue 2 years ago • 1 comments

Regardless of when a PROCEDURE is created, the MODIFIED and CREATED time for is always the current time.

jycor avatar Mar 24 '22 21:03 jycor

Example:

test-fk-indexes $ dolt sql -q "CREATE PROCEDURE example1(x INT) SELECT x + 1;"
test-fk-indexes $ dolt sql -q "show create procedure example1"
+-----------+----------+-----------------------------------------------+----------------------+----------------------+--------------------+
| Procedure | sql_mode | Create Procedure                              | character_set_client | collation_connection | Database Collation |
+-----------+----------+-----------------------------------------------+----------------------+----------------------+--------------------+
| example1  |          | CREATE PROCEDURE example1(x INT) SELECT x + 1 | utf8mb4              | utf8mb4_0900_bin     | utf8mb4_0900_bin   |
+-----------+----------+-----------------------------------------------+----------------------+----------------------+--------------------+
test-fk-indexes $ dolt sql -q "show procedure status"
+-----------------+----------+-----------+---------+----------------------------+---------------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db              | Name     | Type      | Definer | Modified                   | Created                   | Security_type | Comment | character_set_client | collation_connection | Database Collation |
+-----------------+----------+-----------+---------+----------------------------+---------------------------+---------------+---------+----------------------+----------------------+--------------------+
| test_fk_indexes | example1 | PROCEDURE |         | 2022-08-30 23:55:52.124711 | 2022-08-30 23:55:52.12471 | DEFINER       |         | utf8mb4              | utf8mb4_0900_bin     | utf8mb4_0900_bin   |
+-----------------+----------+-----------+---------+----------------------------+---------------------------+---------------+---------+----------------------+----------------------+--------------------+
test-fk-indexes $ dolt sql -q "show procedure status"
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db              | Name     | Type      | Definer | Modified                   | Created                    | Security_type | Comment | character_set_client | collation_connection | Database Collation |
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
| test_fk_indexes | example1 | PROCEDURE |         | 2022-08-30 23:55:58.929267 | 2022-08-30 23:55:58.929267 | DEFINER       |         | utf8mb4              | utf8mb4_0900_bin     | utf8mb4_0900_bin   |
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
test-fk-indexes $ dolt sql -q "show procedure status"
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db              | Name     | Type      | Definer | Modified                   | Created                    | Security_type | Comment | character_set_client | collation_connection | Database Collation |
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
| test_fk_indexes | example1 | PROCEDURE |         | 2022-08-30 23:56:01.906801 | 2022-08-30 23:56:01.906801 | DEFINER       |         | utf8mb4              | utf8mb4_0900_bin     | utf8mb4_0900_bin   |
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
test-fk-indexes $ dolt sql -q "show procedure status"
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db              | Name     | Type      | Definer | Modified                   | Created                    | Security_type | Comment | character_set_client | collation_connection | Database Collation |
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+
| test_fk_indexes | example1 | PROCEDURE |         | 2022-08-30 23:56:04.676936 | 2022-08-30 23:56:04.676935 | DEFINER       |         | utf8mb4              | utf8mb4_0900_bin     | utf8mb4_0900_bin   |
+-----------------+----------+-----------+---------+----------------------------+----------------------------+---------------+---------+----------------------+----------------------+--------------------+

timsehn avatar Aug 30 '22 23:08 timsehn