Skip to content

Commit

Permalink
Fix param order for insert_screening_strategy_sub_wedge
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Levik committed Apr 7, 2019
1 parent 48f140b commit 3a9d54e
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions schema/routines.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ DELIMITER ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE PROCEDURE `insert_screening_strategy_sub_wedge`(
OUT p_id int(10) unsigned,
Expand All @@ -1571,15 +1571,15 @@ CREATE PROCEDURE `insert_screening_strategy_sub_wedge`(
p_exposureTime float,
p_transmission float,
p_oscillationRange float,
p_resolution float,
p_completeness float,
p_multiplicity float,
p_resolution float,
p_doseTotal float,
p_numberOfImages int(10) unsigned,
p_comments varchar(255)
)
MODIFIES SQL DATA
COMMENT 'Insert a row with info about a screening strategy sub-wedge. Ret'
COMMENT 'Insert a row with info about a screening strategy sub-wedge. Returns the ID in p_id.'
BEGIN
INSERT INTO ScreeningStrategySubWedge (
screeningStrategyWedgeId, subWedgeNumber, rotationAxis, axisStart, axisEnd, exposureTime, transmission,
Expand Down Expand Up @@ -4295,6 +4295,40 @@ DELIMITER ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `update_session_archived` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE PROCEDURE `update_session_archived`(
IN p_proposalCode varchar(3),
IN p_proposalNumber int,
IN p_sessionNumber int,
IN p_archived boolean)
MODIFIES SQL DATA
COMMENT 'Updates the session `archived` column for session specified by p_proposalCode, p_proposalNumber, p_sessionNumber'
BEGIN
IF NOT (p_proposalCode IS NULL) AND NOT (p_proposalNumber IS NULL) AND NOT (p_sessionNumber IS NULL) THEN
UPDATE BLSession bs
INNER JOIN Proposal p USING(proposalId)
SET bs.archived = p_archived
WHERE p.proposalCode = p_proposalCode AND p.proposalNumber = p_proposalNumber AND bs.visit_number = p_sessionNumber;
ELSE
SIGNAL SQLSTATE '45000'
SET MYSQL_ERRNO=1644,
MESSAGE_TEXT='Mandatory arguments p_proposalCode, p_proposalNumber int, p_sessionNumber must be non-NULL';
END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `update_session_paths` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
Expand Down Expand Up @@ -7108,4 +7142,4 @@ DELIMITER ;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2019-03-26 18:05:46
-- Dump completed on 2019-04-07 12:35:26

0 comments on commit 3a9d54e

Please sign in to comment.