Plugin Directory

hyperdb

Opened 12 years ago

Closed 12 years ago

#2256 closed defect (fixed)

"DESC table" query wrongly identified as

Reported by: mpvanwinkle77's profile mpvanwinkle77's profile mpvanwinkle77 Owned by: mpvanwinkle77's profile mpvanwinkle77's profile mpvanwinkle77
Priority: normal Severity: normal
Plugin: hyperdb Keywords: query db hyperby mysql
Cc: wink@…

Description

Some plugins, for instance subsribe-to-comments, use the DESC operation to print a table schema. Since this is not accounted for in the hyperdb::is_write_query() function the query gets sent to master, which cause any subsequent query against the table to also be sent to master.

Attachments (3)

diff1.txt (530 bytes) - added by mpvanwinkle77 12 years ago.
Change regex to accomodate use of DESC queries
diff2.txt (2.8 KB) - added by mpvanwinkle77 12 years ago.
Unit tests to validate addition of DESC to regex does not break functionality
diff-nocaret.txt (528 bytes) - added by mpvanwinkle77 12 years ago.
Diff without caret

Download all attachments as: .zip

Change History (8)

@mpvanwinkle77
12 years ago

Change regex to accomodate use of DESC queries

@mpvanwinkle77
12 years ago

Unit tests to validate addition of DESC to regex does not break functionality

#1 @mpvanwinkle77
12 years ago

  • Component changed from not-listed to hyperdb

#2 @mpvanwinkle77
12 years ago

  • Cc wink@… added

#3 @automattic
12 years ago

  • Cc automattic removed

Removing the cc to "automattic" as our email is getting update notifications from Trac every five minutes for some reason. Someone will have a look at this ticket.

#4 @mpvanwinkle77
12 years ago

It occurs to me that the caret before the DESC doesn't make sense here. I'll test and upload a different patch.

@mpvanwinkle77
12 years ago

Diff without caret

#5 @vnsavage
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for reporting this and providing a patch. Committed in r976902.

Note: See TracTickets for help on using tickets.