Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
47949ad1
Commit
47949ad1
authored
Oct 25, 2008
by
webchick
Browse files
#325895
by chx: Fix queryTemporary, which was missing a required argument.
parent
63e8d1e3
Changes
2
Show whitespace changes
Inline
Side-by-side
includes/database/database.inc
View file @
47949ad1
...
...
@@ -631,11 +631,14 @@ abstract public function queryRange($query, Array $args, $from, $count, Array $o
* @param $tablename
* The name of the temporary table to select into. This name will not be
* prefixed as there is no risk of collision.
* @param $options
* An associative array of options to control how the query is run. See
* the documentation for DatabaseConnection::defaultOptions() for details.
* @return
* A database query result resource, or FALSE if the query was not executed
* correctly.
*/
abstract
function
queryTemporary
(
$query
,
Array
$args
,
$tablename
);
abstract
function
queryTemporary
(
$query
,
Array
$args
,
$tablename
,
$options
=
array
()
);
/**
* Returns the type of database driver.
...
...
includes/database/mysql/database.inc
View file @
47949ad1
...
...
@@ -46,7 +46,7 @@ public function queryRange($query, Array $args, $from, $count, Array $options) {
return
$this
->
query
(
$query
.
' LIMIT '
.
$from
.
', '
.
$count
,
$args
,
$options
);
}
public
function
queryTemporary
(
$query
,
Array
$args
,
$tablename
)
{
public
function
queryTemporary
(
$query
,
Array
$args
,
$tablename
,
$options
=
array
()
)
{
$query
=
preg_replace
(
'/^SELECT/i'
,
'CREATE TEMPORARY TABLE '
.
$tablename
.
' Engine=HEAP SELECT'
,
$this
->
prefixTables
(
$query
));
return
$this
->
query
(
$query
,
$args
,
$options
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment