Download & Extend

Remove delay() method from insert queries

Project:Drupal core
Version:7.x-dev
Component:database system
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The idea behind "DELAY" is to allow queries that don't need to commit immediately to just kinda happen when they get there. However, it is not part of standard SQL. It doesn't work on PostgreSQL or SQLite. It only works on MySQL. However, it only works on the MyISAM table type. Drupal 7 on MySQL now defaults to InnoDB, where DELAY is ignored. So really, it's an edge case that we don't even use.

Should we just get rid of it and save ourselves the hassle?

Comments

#1

Status:active» needs review

I couldn't find anywhere that we were using delay() in the first place.

AttachmentSizeStatusTest resultOperations
772554-delay.patch2.52 KBIdlePASSED: [[SimpleTest]]: [MySQL] 19,206 pass(es).View details

#2

Status:needs review» reviewed & tested by the community

Totally. DELAYED means "the day when my database melts down has been delayed by an undefined amount of time". Using INSERT DELAYED adds a lot of interesting problems and altogether you might end up with a lower INSERT performance. More importantly you give up control on what happens with your database. Bad idea.

#3

Status:reviewed & tested by the community» fixed

Yay for less code! :) Committed to HEAD.

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#5

Status:closed (fixed)» needs review

There is more code to be removed.

I also removed the docs: http://drupal.org/node/310079/revisions/view/773668/1024872

AttachmentSizeStatusTest resultOperations
kill-delay.patch2.37 KBIdlePASSED: [[SimpleTest]]: [MySQL] 20,288 pass(es).View details

#6

Looks good

#7

Status:needs review» reviewed & tested by the community

Dagnabbit, I thought I got some of those. Thanks, jbrown.

#8

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here