Skip to content
Snippets Groups Projects
Unverified Commit f45c4407 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

MAINT: Renamed some variables for better debugging

parent 75ed02fc
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
DROP PROCEDURE IF EXISTS db_2_0.initBackReference;
DELIMITER //
CREATE PROCEDURE db_2_0.initBackReference(in pid INT UNSIGNED, in pname VARCHAR(255), in eid INT UNSIGNED, in ename VARCHAR(255))
CREATE PROCEDURE db_2_0.initBackReference(in pid INT UNSIGNED, in pname VARCHAR(255), in entity_id INT UNSIGNED, in ename VARCHAR(255))
BEGIN
DECLARE propertiesTable VARCHAR(255) DEFAULT NULL;
DECLARE entitiesTable VARCHAR(255) DEFAULT NULL;
......@@ -35,7 +35,7 @@ BEGIN
IF ename IS NOT NULL THEN
call createTmpTable(entitiesTable);
call initSubEntity(eid, ename, entitiesTable);
call initSubEntity(entity_id, ename, entitiesTable);
END IF;
SELECT propertiesTable, entitiesTable;
......
......@@ -90,7 +90,7 @@ END //
DROP PROCEDURE IF EXISTS db_2_0.initPOVRefidsTable //
CREATE PROCEDURE db_2_0.initPOVRefidsTable(in vInt INT, in vText VARCHAR(255))
CREATE PROCEDURE db_2_0.initPOVRefidsTable(in vInt INT UNSIGNED, in vText VARCHAR(255))
BEGIN
DECLARE refIdsTable VARCHAR(255) DEFAULT NULL; /*table for referenced entity ids*/
......
......@@ -26,7 +26,7 @@ DROP PROCEDURE IF EXISTS db_2_0.initSubEntity;
DELIMITER //
CREATE PROCEDURE db_2_0.initSubEntity(in eid INT UNSIGNED, in ename VARCHAR(255), in tableName VARCHAR(255))
CREATE PROCEDURE db_2_0.initSubEntity(in e_id INT UNSIGNED, in ename VARCHAR(255), in tableName VARCHAR(255))
BEGIN
DECLARE ecount INT DEFAULT 0;
......@@ -37,8 +37,8 @@ BEGIN
SET ecount = ROW_COUNT();
DEALLOCATE PREPARE stmt;
IF eid IS NOT NULL THEN
SET @stmtStr = CONCAT('INSERT IGNORE INTO `', tableName, '` (id) VALUES (', eid, ')');
IF e_id IS NOT NULL THEN
SET @stmtStr = CONCAT('INSERT IGNORE INTO `', tableName, '` (id) VALUES (', e_id, ')');
PREPARE stmt FROM @stmtStr;
EXECUTE stmt;
SET ecount = ecount + ROW_COUNT();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment