View Issue Details

IDProjectCategoryView StatusLast Update
0001733RackTablesdefaultpublic2017-03-06 16:12
Reporterlrupp 
Assigned To 
PrioritynormalSeverityminorReproducibilitysometimes
Status acknowledgedResolutionopen 
Product Version0.20.12 
Target Version0.20.13Fixed in Version 
Summary0001733: Query failed during upgrade
DescriptionTrying to upgrade from Racktables 0.20.11 to 0.20.12 I get the following error report:
The following queries failed:

CREATE TRIGGER `Port-before-insert` BEFORE INSERT ON `Port` FOR EACH ROW PortTrigger:BEGIN
  IF (NEW.`l2address` IS NOT NULL AND (SELECT COUNT(*) FROM `Port` WHERE `l2address` = NEW.`l2address` AND `object_id` != NEW.`object_id`) > 0) THEN
    CALL `Port-l2address-already-exists-on-another-object`;
  END IF;
END; -- You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
CREATE TRIGGER `Port-before-update` BEFORE UPDATE ON `Port` FOR EACH ROW PortTrigger:BEGIN
  IF (NEW.`l2address` IS NOT NULL AND (SELECT COUNT(*) FROM `Port` WHERE `l2address` = NEW.`l2address` AND `object_id` != NEW.`object_id`) > 0) THEN
    CALL `Port-l2address-already-exists-on-another-object`;
  END IF;
END; -- You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

I tried to execute the statements above with root privileges on the database, but also failed.

Looks to me like there is no stored procedure named 'Port-l2address-already-exists-on-another-object' in my database.

I even could not find anything that defined this procedure in the code - while I see that in install.php and upgrade.php is a call to this procedure.
Steps To ReproduceInstall 0.20.11 and upgrade to 0.20.12.
TagsNo tags attached.

Relationships

has duplicate 0001741 closed Cannot upgrade to 0.20.12 due to missing stored procedure 

Activities

infrastation

2017-02-13 19:05

administrator   ~0003549

Could quote the name and exact version of the SQL server?

lrupp

2017-02-13 20:50

reporter   ~0003551

~# mysql --version
mysql Ver 14.14 Distrib 5.5.54, for Linux (x86_64) using readline 5.2

=> MySQL server version 5.5.54 from http://www.mysql.com/

The MySQL server is running a master-master setup.

lrupp

2017-02-13 20:51

reporter   ~0003553

What wonders me most is the missing `Port-l2address-already-exists-on-another-object` I could not find that in the code nor in my database (but I might be wrong here as I just tried the "SHOW PROCEDURE STATUS; SHOW FUNCTION STATUS;" calls as root without any result).

infrastation

2017-02-13 21:18

administrator   ~0003555

As far as it is possible to see from the code, the author of the trigger had used non-existent procedure names with the intent that the error will occur only at the trigger run time. So don't worry, it is not a problem at your side. Some instances of MySQL and MariaDB seem to check the procedure existence at the triggers creation time. This bug would be best fixed before the next release.

kissg

2017-03-06 14:53

reporter   ~0003585

> This bug would be best fixed before the next release.

Do you mean next release of DB engine or next release of Racktables? :-)
Is there any known workaround at this moment? E.g. creating an empty procedure with the same name or so.

infrastation

2017-03-06 16:12

administrator   ~0003587

I mean the next release of RackTables. This bug justifies to make it soon, so I wasn't considering any temporary workarounds.

Issue History

Date Modified Username Field Change
2017-02-13 15:51 lrupp New Issue
2017-02-13 19:05 infrastation Note Added: 0003549
2017-02-13 20:50 lrupp Note Added: 0003551
2017-02-13 20:51 lrupp Note Added: 0003553
2017-02-13 21:18 infrastation Reproducibility always => sometimes
2017-02-13 21:18 infrastation Status new => acknowledged
2017-02-13 21:18 infrastation Target Version => 0.20.13
2017-02-13 21:18 infrastation Note Added: 0003555
2017-03-04 14:38 infrastation Relationship added has duplicate 0001741
2017-03-06 14:53 kissg Note Added: 0003585
2017-03-06 16:12 infrastation Note Added: 0003587