PREG_CAPTURE and group by - mariadb goes down
Opened this issue · 0 comments
bezdelnique commented
Hello.
I have a problem with combination PREG_CAPTURE and group by
Type of field which I am working with: requestUri varchar(255) null
This query works fine
SELECT PREG_CAPTURE('~^(/[^/]+)~', requestUri) as requestUri
FROM `dict_log_error404`All the rest goes Mariadb down. The only way to make it live is command killall -9 mysqld.
All I need is make to do count.
SELECT PREG_CAPTURE('~^(/[^/]+)~', requestUri) as requestUri, count(*) as cnt
FROM dict_log_error404
group by requestUriMy another try
SELECT PREG_CAPTURE('~^(/[^/]+)~', requestUri) as requestUri
FROM dict_log_error404
where requestUri regexp '^(/[^/]+)'
group by requestUri.. and another one
select count(*) as cnt, requestUri from
(
SELECT PREG_CAPTURE('~^(/[^/]+)~', requestUri) as requestUri
FROM dict_log_error404
where requestUri regexp '^(/[^/]+)'
) e
group by requestUriHelp me, please.
I like PRCE so much! ;)