"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mysql/utilities/command/proc.py" between
mysql-utilities-1.6.4.tar.gz and mysql-utilities-1.6.5.tar.gz

About: MySQL Utilities is a package of utilities that are used for maintenance and administration of MySQL servers (written in Python).

proc.py  (mysql-utilities-1.6.4):proc.py  (mysql-utilities-1.6.5)
# #
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. # the Free Software Foundation; version 2 of the License.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
skipping to change at line 171 skipping to change at line 171
a body (if only_body = True). a body (if only_body = True).
only_body[in] if True, limit to body of object only_body[in] if True, limit to body of object
default = False default = False
Returns string - SQL statement Returns string - SQL statement
""" """
params = { params = {
'select': "\n ".join(self.__select.split("\n")), 'select': "\n ".join(self.__select.split("\n")),
'kill': 'CONNECTION' if KILL_CONNECTION in self.__actions 'kill': 'CONNECTION' if KILL_CONNECTION in self.__actions
else 'QUERY', else 'QUERY',
} }
if KILL_CONNECTION in self.__actions or KILL_QUERY in self.__actions: if KILL_CONNECTION in self.__actions or KILL_QUERY in self.__actions:
sql = _KILL_BODY.format(**params) sql = _KILL_BODY.format(**params)
if not only_body: if not only_body:
sql = _KILL_PROCEDURE.format( sql = _KILL_PROCEDURE.format(
name="kill_processes", name="kill_processes",
body="\n ".join(sql.split("\n")) body="\n ".join(sql.split("\n"))
) )
return sql return sql
else: else:
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS