The regular expressions seem to be matching more than they mean to.

Comments

moshe weitzman’s picture

Anyone care to review this? killes?

rolodmonkey’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: Unassigned » rolodmonkey
StatusFileSize
new710 bytes

I have reviewed this. The only subtle change I would recommend is to keep the single-quotes around the S after the match. I have attached a patch with this change.

I have not confirmed that this matches floats correctly. Other than that, I believe this is ready to go.

Also, this looks like it needs to be back-ported to the 5.x version. Can anyone confirm if this also needs to be changed in the 7.x version?

Status: Needs review » Needs work

The last submitted patch, devel_query_preg_match.patch, failed testing.

rolodmonkey’s picture

StatusFileSize
new706 bytes

Darn line endings! :)

rolodmonkey’s picture

Status: Needs work » Needs review
salvis’s picture

Is this still an issue?

john morahan’s picture

Yes, though I think it only affects 6.x now.

john morahan’s picture

In fact, I don't think this functionality exists at all in 7.x...

salvis’s picture

@John: Have you reviewed the patch in #4?

(We don't maintain D5 anymore.)

rolodmonkey’s picture

Status: Needs review » Closed (won't fix)

I'm assuming that this functionality moved to the Performance Logging module:

http://drupal.org/project/performance

fuzzy76’s picture

Status: Closed (won't fix) » Needs review

The perfomance logging module doesn't do per-query logging at all as far as I can tell.

moshe weitzman’s picture

Project: Devel » Performance Logging and Monitoring (D7)
Version: 6.x-1.x-dev » 7.x-1.6
Component: devel » Code
Assigned: rolodmonkey » Unassigned
mgifford’s picture

Status: Needs review » Closed (won't fix)

I'm marking this as closed as it doesn't seem like preg_replace is even used in this module any more.

$ grep -ir 'preg' *
performance.module:      if (preg_match($regex, $cache_data['info']) && $cache_data['creation_time'] >= $timestamp) {