The branch, master has been updated via e15d5de30991885663c3538b46e4de02d41dd74b (commit) from c8b2cf6bf30e9704b3d7d1582c43df26ad2a97ca (commit)
- Log ----------------------------------------------------------------- commit e15d5de30991885663c3538b46e4de02d41dd74b Author: Piotr Przybylski piotrprz@gmail.com Date: Wed Jul 6 19:29:54 2011 +0200
Add TO_SECONDS and UUID_SHORT to MySQL function list (only for supported versions)
-----------------------------------------------------------------------
Summary of changes: libraries/data_mysql.inc.php | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/libraries/data_mysql.inc.php b/libraries/data_mysql.inc.php index e457d57..d504d15 100644 --- a/libraries/data_mysql.inc.php +++ b/libraries/data_mysql.inc.php @@ -226,9 +226,11 @@ if ($cfg['ShowFunctionFields']) { 'SQRT', 'TAN', 'TO_DAYS', + 'TO_SECONDS', 'TIME_TO_SEC', 'UNCOMPRESSED_LENGTH', 'UNIX_TIMESTAMP', + 'UUID_SHORT', 'WEEK', 'WEEKDAY', 'WEEKOFYEAR', @@ -256,6 +258,14 @@ if ($cfg['ShowFunctionFields']) { 'MPolyFromWKB', ), ); + // $restrict_functions holds all known functions, remove these that are unavailable on current server + if (PMA_MYSQL_INT_VERSION < 50500) { + $restrict_functions['FUNC_NUMBER'] = array_diff($restrict_functions['FUNC_NUMBER'], array('TO_SECONDS')); + } + if (PMA_MYSQL_INT_VERSION < 50120) { + $restrict_functions['FUNC_NUMBER'] = array_diff($restrict_functions['FUNC_NUMBER'], array('UUID_SHORT')); + } + if (empty($cfg['RestrictFunctions'])) { $cfg['RestrictFunctions'] = $restrict_functions; }
hooks/post-receive