Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3174996
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3174996
Commits
a7a0ee83
Commit
a7a0ee83
authored
14 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#772554
by Crell, jbrown: remove delay() method from insert queries.
parent
45da508e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.txt
+1
-1
1 addition, 1 deletion
CHANGELOG.txt
includes/database/query.inc
+2
-14
2 additions, 14 deletions
includes/database/query.inc
with
3 additions
and
15 deletions
CHANGELOG.txt
+
1
−
1
View file @
a7a0ee83
...
...
@@ -7,7 +7,7 @@ Drupal 7.0, xxxx-xx-xx (development version)
* Drupal now requires MySQL >= 5.0.15 or PostgreSQL >= 8.3.
* Added query builders for INSERT, UPDATE, DELETE, MERGE, and SELECT queries.
* Support for master/slave replication, transactions, multi-insert queries,
delayed inserts,
and other features.
and other features.
* Added support for the SQLite database engine.
* Default to InnoDB engine, rather than MyISAM, on MySQL when available.
This offers increased scalability and data integrity.
...
...
This diff is collapsed.
Click to expand it.
includes/database/query.inc
+
2
−
14
View file @
a7a0ee83
...
...
@@ -322,14 +322,6 @@ class InsertQuery extends Query {
*/
protected
$table
;
/**
* Whether or not this query is "delay-safe". Different database drivers
* may or may not implement this feature in their own ways.
*
* @var boolean
*/
protected
$delay
;
/**
* An array of fields on which to insert.
*
...
...
@@ -368,7 +360,6 @@ public function __construct($connection, $table, array $options = array()) {
if
(
!
isset
(
$options
[
'return'
]))
{
$options
[
'return'
]
=
Database
::
RETURN_INSERT_ID
;
}
$options
+=
array
(
'delay'
=>
FALSE
);
parent
::
__construct
(
$connection
,
$options
);
$this
->
table
=
$table
;
}
...
...
@@ -471,11 +462,8 @@ public function from(SelectQueryInterface $query) {
* @return
* The last insert ID of the query, if one exists. If the query
* was given multiple sets of values to insert, the return value is
* undefined. If the query is flagged "delayed", then the insert ID
* won't be created until later when the query actually runs so the
* return value is also undefined. If no fields are specified, this
* method will do nothing and return NULL. That makes it safe to use
* in multi-insert loops.
* undefined. If no fields are specified, this method will do nothing and
* return NULL. That makes it safe to use in multi-insert loops.
*/
public
function
execute
()
{
// If validation fails, simply return NULL.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment