forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Feature Request : Add Control
- This topic is empty.
-
AuthorPosts
-
-
October 7, 2011 at 9:56 am #12473fvdwParticipant
I'm using SQLYog on differents databases : some are for test/development, some are real (production). I will be nice to be able to add some control for “production's databases”. Like “are-you sure to drop ?”, “truncate”, “delete whithout where conditions” Etc…
As we can give a color to the differents connections, It will be nice -under the Advanced tab- to be able to check a box “production” which enable such controls…
-
October 10, 2011 at 10:58 am #32708peterlaursenParticipant
We do warn to my best knowledge if user DROPS an object or TRUNCATES a table. Provided of course that he does from the GUI and not the editor. Are you requesting similar warnings with statements executed from the editor? If so this involves *client side parsing* of the statement and this I doubt we will do.
-
May 11, 2012 at 10:52 am #32709fvdwParticipant
Sorry for my very late answer !
Yes, I mean parsing update and delete statments (on productions connexion – identified thru the advanced tab). When the parser hits such a statment without condition or limit, show some alert “Are you sure to do that ?”
-
May 11, 2012 at 1:25 pm #32710peterlaursenParticipant
But we don't have any SQL-parser in SQLyog. The parser is on the server.
The server has a variable named 'sql_safe_updates' ,
Refer http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_sql_safe_updates
“If set to 1, MySQL aborts UPDATE or DELETE statements that do not use a key in the WHERE clause or a LIMIT clause. This makes it possible to catch UPDATE or DELETE statements where keys are not used properly and that would probably change or delete a large number of rows.”
In SQLyog since version 9.63 you can enter the INIT_COMMAND “SET sql_safe_updates = 1” in the 'advanced tab' for the connection.
-
-
AuthorPosts
- You must be logged in to reply to this topic.