Page 1 of 1

Insert into queuemetrics doesn't work

PostPosted: Thu Mar 10, 2016 6:20 am
by areon
Hello all!

Please, help: insert into queuemetrics doesn't work because of PARTITION - keyword MySQL, but everywhere in code string query look like "INSERT INTO queue_log SET partition='P01'" where word PARTITION without apostrophe (`partition`).
How to solve this problem? How insert data in this table?

MySQL (MariaDB) version: 10.0.22
QueueMetrics version: 15.10.1
ViciBox version: 7.01
Vicidial VERSION: 2.12-538a BUILD: 160122-1401.

Re: Insert into queuemetrics doesn't work

PostPosted: Thu Mar 10, 2016 9:07 am
by mflorell
We just upgraded an existing client to use the most recent version of QueueMetrics and didn't notice this problem at all. Is that all you got as an error?

Re: Insert into queuemetrics doesn't work

PostPosted: Thu Mar 10, 2016 9:59 am
by areon
Step by step:
1) we install VICIbox-system version 7.01 (all in one);
2) restore db QM (database was dump from maria_db 5.5.4) in this server_db;
3) we was setup settings qm in vicidial_settings (login, pass, etc);
4) restart apache tomcat and start QM;
5) after this steps insert into queue_log doesn't work.

Matt, do you use version Maria DB 10.0.22?
What I should do?

Re: Insert into queuemetrics doesn't work

PostPosted: Thu Mar 10, 2016 4:21 pm
by mflorell
Did you make sure to grant database permissions on the QM database to the user you specified in the vicidial settings?

We have not tested QueueMetrics on the newest versions of MariaDB.

Re: Insert into queuemetrics doesn't work

PostPosted: Fri Mar 11, 2016 2:47 am
by areon
>>>Did you make sure to grant database permissions on the QM database to the user you specified in the vicidial settings?<<<

Yes, sure!
The whole problem consists in this wacky word PARTITION, which is a keyword in the database and can not be used without quotation marks. With apostrophes everything works, but in all php, pl, agi files written queries without them!

Re: Insert into queuemetrics doesn't work

PostPosted: Fri Mar 11, 2016 9:18 am
by mflorell
Well that stinks, I do hate it when developers create new reserved words in new versions of software. In most changes like this in MariaDB there are options to turn off new features or new defaults, have you found any options around this?

As for changing the code, it will probably take a while, and there will need to be a lot of testing because backticks are used for other purposes in PHP and Perl so they may need to be canceled-out in some places.

Re: Insert into queuemetrics doesn't work

PostPosted: Fri Mar 11, 2016 9:49 am
by areon
>>>have you found any options around this?<<<
Well, honestly, if we had found a bypass option, we would not have written here =)

Matt, what if we try to return to an older version of MariaDB?

Buy the way, if you have accepted this task in develop, what a terms of implementation?
Need help?

Re: Insert into queuemetrics doesn't work

PostPosted: Fri Mar 11, 2016 11:46 am
by mflorell
It looks like MariaDB added "PARTITIOIN" as a reserved word in version 10.0. So if you downgraded to a version before that, then it should work without any issues.

As for programming a fix for this, there are hundreds of queries affected in the codebase in dozens of different scripts, it would probably take 10 hours of programming time to change them all, not including the testing of all of the changes.

Re: Insert into queuemetrics doesn't work

PostPosted: Sat Mar 12, 2016 5:11 am
by areon
Thank you for your help! Last question: we wait for the new version vicidial, or we revert to the old version of the MariaDB?

Re: Insert into queuemetrics doesn't work

PostPosted: Sat Mar 12, 2016 9:12 am
by mflorell
It might be a while before I can get to this, so I would recommend downgrading MariaDB.

Re: Insert into queuemetrics doesn't work

PostPosted: Wed Nov 02, 2016 11:57 am
by mflorell
Well, it only took 7 months :)

One of our clients paid for this update. So VICIdial should now work just fine with newer versions of QueueMetrics running on newer versions of MySQL and MariaDB.

If you run into any further issues with this, please let us know.