Cannot successfully create events

[expired user #6094]'s profile image [expired user #6094] posted 12 years ago in Running SQL scripts Permalink
Steps to reproduce:
1) Right click database
2) Create new > event
3) Enter query in Execution Body
4) Set schedule (run once) in Timing Tab
5) Click Save button

The log shows the following message:
/* Table node "event_name_goes_here" not found in tree. */


I cannot find record of the event anywhere, either in the HeidiSQL hierarchy or using SHOW EVENTS.

Thoughts? Solutions? Please help!
ansgar's profile image ansgar posted 12 years ago Permalink
Didn't you receive some error message?
[expired user #6094]'s profile image [expired user #6094] posted 12 years ago Permalink
No error message or dialog box is displayed after I click the Save button. Here is what the log shows:

CREATE EVENT `event_name` ON SCHEDULE  AT '2011-12-15 11:01:00'  ON COMPLETION NOT PRESERVE  ENABLE  COMMENT ''  DO BEGIN   CALL sp1();  CALL sp2(); END;
SHOW TABLE STATUS FROM `db_name`;
SHOW FUNCTION STATUS WHERE `Db`='db_name';
SHOW PROCEDURE STATUS WHERE `Db`='db_name';
SHOW TRIGGERS FROM `db_name`;
SHOW EVENTS FROM `db_name`;
/* Table node "event_name" not found in tree. */


Copy and pasting the create code returns an error dialog box though: SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near " at line 8
. This error is not correct, the syntax is by-the-book -- no missing semi-colons, etc.
ansgar's profile image ansgar posted 12 years ago Permalink
Hehe, you were kidding yourself: The event was created, but then auto-deleted, due to the "ON COMPLETION NOT PRESERVE" clause. That means the event is deleted by the server automatically after it has finished its (last) execution.
[expired user #6094]'s profile image [expired user #6094] posted 12 years ago Permalink
I am pretty sure the event never ran though. It takes ~40 minutes to run all the queries. I'll try it without that clause though and report back.
[expired user #6094]'s profile image [expired user #6094] posted 12 years ago Permalink
Okay, halfway there... when I unchecked the box it creates the event but it does not run. When I query SHOW EVENTS, it returns a row for the event but status = DISABLED. In the create event window I unchecked "drop event after expiration" but made just the "enabled" radio button was checked under State. What am I missing?
[expired user #6094]'s profile image [expired user #6094] posted 12 years ago Permalink
This may be relevant - I am running this all on a slave server. Some of the MySQL forums mention this issue.
[expired user #6094]'s profile image [expired user #6094] posted 12 years ago Permalink
Anse - any thoughts?
ansgar's profile image ansgar posted 12 years ago Permalink
Oh, I cannot reproduce that here. I create an event with
- an unchecked "Drop..." checkbox
- state=enabled
and the event shows up quickly after having clicked "save".

There's a good chance that there is some side effect with your slave server setup.

Which HeidiSQL revision?
[expired user #6094]'s profile image [expired user #6094] posted 12 years ago Permalink
Version 6.0.0.3603
ansgar's profile image ansgar posted 12 years ago Permalink
Well this is the 6.0 release. You should upgrade to the latest build. I can't recall some major change in the event editor but I may be missing something within the 400 commits since r3603.
[expired user #6094]'s profile image [expired user #6094] posted 12 years ago Permalink
Updated to the latest release and now receive an error when connecting. Bug report:

date/time         : 2011-12-20, 13:38:48, 551ms
computer name     : MCF-PC
user name         : MCF
registered owner  : MCF / Microsoft
operating system  : Windows 7 x64 Service Pack 1 build 7601
system language   : English
system up time    : 9 days 22 hours
program up time   : 18 seconds
processors        : 2x Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
physical memory   : 890/4061 MB (free/total)
free disk space   : (C:) 18.45 GB
display mode      : 1920x1080, 32 bit
process id        : $2f8c
allocated memory  : 53.14 MB
executable        : heidisql.exe
exec. date/time   : 2011-12-20 13:30
version           : 6.0.0.3990
compiled with     : Delphi XE
madExcept version : 3.0m beta 1
callstack crc     : $db82bfa4, $f5c5e38d, $f5c5e38d
exception number  : 1
exception class   : EStringListError
exception message : List index out of bounds (2).
main thread ($2a1c):
004a0b30 heidisql.exe Classes                TStringList.Get
0072edc3 heidisql.exe dbconnection 1794  +13 TDBConnection.GetAllDatabases
0072ee38 heidisql.exe dbconnection 1805   +1 TMySQLConnection.GetAllDatabases
007cfb7a heidisql.exe Main         2953  +43 TMainForm.InitConnection
0077029f heidisql.exe connections   251   +3 Tconnform.btnOpenClick
004e9227 heidisql.exe Controls               TControl.Click
0051fe16 heidisql.exe StdCtrls               TCustomButton.Click
00520904 heidisql.exe StdCtrls               TCustomButton.CNCommand
004e8cbc heidisql.exe Controls               TControl.WndProc
004ed580 heidisql.exe Controls               TWinControl.WndProc
0051fae0 heidisql.exe StdCtrls               TButtonControl.WndProc
004e88e0 heidisql.exe Controls               TControl.Perform
004ed6d3 heidisql.exe Controls               DoControlMsg
004ee12f heidisql.exe Controls               TWinControl.WMCommand
0056fc98 heidisql.exe Forms                  TCustomForm.WMCommand
004e8cbc heidisql.exe Controls               TControl.WndProc
004ed580 heidisql.exe Controls               TWinControl.WndProc
0056cb9c heidisql.exe Forms                  TCustomForm.WndProc
004ecc20 heidisql.exe Controls               TWinControl.MainWndProc
004ab4d8 heidisql.exe Classes                StdWndProc
76890d48 USER32.dll                          CallWindowProcW
00698cfc heidisql.exe helpers      1143   +1 CallOld
00698e44 heidisql.exe helpers      1190  +44 SizeGripWndProc
76890d48 USER32.dll                          CallWindowProcW
004ed680 heidisql.exe Controls               TWinControl.DefaultHandler
004e9678 heidisql.exe Controls               TControl.WMLButtonUp
004e8cbc heidisql.exe Controls               TControl.WndProc
004ed580 heidisql.exe Controls               TWinControl.WndProc
0051fae0 heidisql.exe StdCtrls               TButtonControl.WndProc
004ecc20 heidisql.exe Controls               TWinControl.MainWndProc
004ab4d8 heidisql.exe Classes                StdWndProc
76887885 USER32.dll                          DispatchMessageW
00575b6b heidisql.exe Forms                  TApplication.ProcessMessage
00575bae heidisql.exe Forms                  TApplication.HandleMessage
0057150d heidisql.exe Forms                  TCustomForm.ShowModal
007cad8c heidisql.exe Main         1746 +109 TMainForm.Startup
007f88b7 heidisql.exe heidisql       66  +15 initialization
75513398 kernel32.dll                        BaseThreadInitThunk
Code modification/commit from ansgar.becker, 12 years ago, revision 6.0.0.3991
Fix rare errors when passing a broken list of databases via session manager. See http://www.heidisql.com/forum.php?t=9550
ansgar's profile image ansgar posted 12 years ago Permalink
Should be fixed in r3991 - please update again.

Please login to leave a reply, or register at first.