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
afeff189
Commit
afeff189
authored
Aug 25, 2005
by
Dries
Browse files
- Bug
#22911
: PostgreSQL doesn't like "LOCK TABLES", but does like "LOCK TABLE". MySQL likes both.
parent
347ac3b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/bootstrap.inc
View file @
afeff189
...
...
@@ -232,10 +232,10 @@ function variable_get($name, $default) {
function
variable_set
(
$name
,
$value
)
{
global
$conf
;
db_query
(
'LOCK TABLE
S
{variable} WRITE'
);
db_query
(
'LOCK TABLE {variable} WRITE'
);
db_query
(
"DELETE FROM
{
variable
}
WHERE name = '%s'"
,
$name
);
db_query
(
"INSERT INTO
{
variable
}
(name, value) VALUES ('%s', '%s')"
,
$name
,
serialize
(
$value
));
db_query
(
'UNLOCK TABLE
S
'
);
db_query
(
'UNLOCK TABLE'
);
cache_clear_all
(
'variables'
);
...
...
@@ -321,12 +321,12 @@ function cache_get($key) {
function
cache_set
(
$cid
,
$data
,
$expire
=
CACHE_PERMANENT
,
$headers
=
NULL
)
{
$data
=
db_encode_blob
(
$data
);
db_query
(
'LOCK TABLE
S
{cache} WRITE'
);
db_query
(
'LOCK TABLE {cache} WRITE'
);
db_query
(
"UPDATE
{
cache
}
SET data = '%s', created = %d, expire = %d, headers = '%s' WHERE cid = '%s'"
,
$data
,
time
(),
$expire
,
$headers
,
$cid
);
if
(
!
db_affected_rows
())
{
@
db_query
(
"INSERT INTO
{
cache
}
(cid, data, created, expire, headers) VALUES ('%s', '%s', %d, %d, '%s')"
,
$cid
,
$data
,
time
(),
$expire
,
$headers
);
}
db_query
(
'UNLOCK TABLE
S
'
);
db_query
(
'UNLOCK TABLE'
);
}
/**
...
...
Write
Preview
Supports
Markdown
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