/**
* Runs the linting process.
*
* @param string $query The query to be checked.
*
* @return array
*/
public static function lint($query)
{
// Disabling lint for huge queries to save some resources.
if (/*overload*/mb_strlen($query) > 10000) {
return array(
array(
'message' => __(
'Linting is disabled for this query because it exceeds the '
. 'maximum length.'
),
'fromLine' => 0,
'fromColumn' => 0,
'toLine' => 0,
'toColumn' => 0,
'severity' => 'warning',
)
);
}
1条答案
按热度按时间pb3skfrl1#
phpmyadmin的源代码揭示了消息文本的来源。。。
https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/classes/linter.php