Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
20f6f336
Commit
20f6f336
authored
Jan 08, 2020
by
Carsten Rose
Browse files
Revert implementation of #8851.
parent
61c76099
Pipeline
#3110
passed with stages
in 1 minute and 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Core/Constants.php
View file @
20f6f336
...
...
@@ -783,7 +783,6 @@ const RANDOM_LENGTH = 32;
// SQL logging Modes
const
SQL_LOG_MODE_ALL
=
'all'
;
const
SQL_LOG_MODE_MODIFY
=
'modify'
;
const
SQL_LOG_MODE_MODIFY_ALL
=
'modifyAll'
;
const
SQL_LOG_MODE_NONE
=
'none'
;
const
SQL_LOG_MODE_ERROR
=
'error'
;
...
...
extension/Classes/Core/Database/Database.php
View file @
20f6f336
...
...
@@ -50,7 +50,7 @@ class Database {
/**
* @var array
*/
private
$sqlLogModePrio
=
[
SQL_LOG_MODE_NONE
=>
1
,
SQL_LOG_MODE_ERROR
=>
2
,
SQL_LOG_MODE_MODIFY
=>
3
,
SQL_LOG_MODE_
MODIFY_
ALL
=>
4
,
SQL_LOG_MODE_ALL
=>
5
];
private
$sqlLogModePrio
=
[
SQL_LOG_MODE_NONE
=>
1
,
SQL_LOG_MODE_ERROR
=>
2
,
SQL_LOG_MODE_MODIFY
=>
3
,
SQL_LOG_MODE_ALL
=>
4
];
private
$dbName
=
''
;
...
...
@@ -358,9 +358,7 @@ class Database {
*/
private
function
prepareExecute
(
$sql
,
array
$parameterArray
,
&
$queryType
,
array
&
$stat
,
$specificMessage
=
''
,
array
$skipErrno
=
array
())
{
// Only log a modify type statement here if sqlLogMode is (at least) modifyAll
// If sqlLogMode is modify, log the statement after it has been executed and we know if there are affected rows.
$sqlLogMode
=
$this
->
isSqlModify
(
$sql
)
?
SQL_LOG_MODE_MODIFY_ALL
:
SQL_LOG_MODE_ALL
;
$sqlLogMode
=
$this
->
isSqlModify
(
$sql
)
?
SQL_LOG_MODE_MODIFY
:
SQL_LOG_MODE_ALL
;
$errno
=
0
;
$result
=
0
;
...
...
@@ -489,18 +487,7 @@ class Database {
$this
->
store
->
setVar
(
SYSTEM_SQL_COUNT
,
$count
,
STORE_SYSTEM
);
}
// Logfile
$pageContentSqlLogMode
=
$this
->
store
->
getVar
(
SYSTEM_SQL_LOG_MODE
,
STORE_SYSTEM
);
if
(
$pageContentSqlLogMode
==
SQL_LOG_MODE_MODIFY
&&
$sqlLogMode
==
SQL_LOG_MODE_MODIFY_ALL
)
{
// sqlLogMode modify: need to log query and query result (if count > 0)
if
(
$count
>
0
)
{
$this
->
dbLog
(
SQL_LOG_MODE_MODIFY
,
$sql
,
$parameterArray
);
$this
->
dbLog
(
SQL_LOG_MODE_MODIFY
,
$msg
);
}
}
else
{
// Query result
$this
->
dbLog
(
$sqlLogMode
,
$msg
);
}
$this
->
dbLog
(
$sqlLogMode
,
$msg
);
return
$count
;
}
...
...
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