Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
select offset, dstStart, dstEnd from timezone into _offset, _dstStart, _dstEnd;
if (startUtcTime >= _dstStart and startUtcTime < _dstEnd) then
set _offset = addtime(_offset, '01:00:00');
periods_loop : LOOP
IF period >= endtime
THEN leave periods_loop;
set localperiod = addtime(period, _offset);
set startrange = addtime(period, '-00:07:30');
set endrange = addtime(period,'00:07:30');
UPDATE updperiod SET timest = period;
set @sql = concat('update ', tableName, ' set periodlocaltime = "', localperiod, '" where starttime > "', startrange, '" and starttime <= "', endrange, '"');
#UPDATE pre_mib2 SET periodlocaltime = addtime(period, _offset) WHERE starttime > (addtime(period, '-00:07:30')) AND starttime <= (addtime(period,'00:07:30'));
prepare stmt1 from @sql;
deallocate prepare stmt1;
set period = addtime(period, '00:15:00');
But when I try to call the procedure I get the following error:
mysql> call UpdatePeriodLocaltime("2015-04-02","table_name");
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL' at line 1
I have created another procedure with only one IN parameter and that works just fine...
Recommendation (even if you've solved your issue):
decouple the two things.
Use MariaDB (or whichever DB - even Oracle or DB2) just to store/retrieve/link data, and use a programming language to handle it.
Reasons are a bit complex - on a long run (or on a short run with changes to the DB-infrastructure) you won't regret it.