You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MySQL [palilax/dev]> SET @event_id='cb8ba301-6c27-4bf8-b99b-617082d72621';
Query OK, 1 row affected (0.058 sec)
MySQL [palilax/dev]> INSERT INTO person_cal_entries (id, cal_entry_id_fk, person_id_fk)
-> SELECT uuid() as id, @event_id as cal_entry_id_fk, id as person_id_fk
-> FROM personnel
-> WHERE id IN (
-> SELECT person_id_fk
-> FROM season_participants
-> WHERE season_id_fk = (
-> SELECT season_id_fk
-> FROM cal_entries
-> WHERE id = @event_id
-> )
-> );
Query OK, 23 rows affected (0.051 sec)
and try to turn it into a stored procedure:
MySQL [palilax/dev]> DELIMITER // ;
MySQL [palilax/dev]> CREATE PROCEDURE create_cal_entries_for_event(IN event_id VARCHAR(36))
-> BEGIN
-> INSERT INTO person_cal_entries (id, cal_entry_id_fk, person_id_fk)
-> SELECT uuid() as id, event_id as cal_entry_id_fk, id as person_id_fk
-> FROM personnel
-> WHERE id IN (
-> SELECT person_id_fk
-> FROM season_participants
-> WHERE season_id_fk = (
-> SELECT season_id_fk
-> FROM cal_entries
-> WHERE id = event_id
-> )
-> );
-> END //
Query OK, 0 rows affected (0.051 sec)
MySQL [palilax/dev]> DELIMITER ; //
and then attempt to call the stored procedure:
MySQL [palilax/dev]> call create_cal_entries_for_event('cb8ba301-6c27-4bf8-b99b-617082d72621');
ERROR 2013 (HY000): Lost connection to server during query
This is fixed in dolthub/go-mysql-server#1475
I guessed the schemas of the tables that were mentioned, along with some dummy data for them, to create a test case.
If I take the following SQL which works:
and try to turn it into a stored procedure:
and then attempt to call the stored procedure:
I get the following panic in the sql server logs:
The text was updated successfully, but these errors were encountered: