-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.8
-
None
-
None
Report: http://www.phpbb.com/community/viewtopic.php?f=46&t=2127576
SQL ERROR [ firebird ]
|
|
Dynamic SQL Error SQL error code = -842 Precision must be from 1 to 18 [-842]
|
|
SQL
|
|
UPDATE phpbb_config SET config_value = CAST(CAST(config_value as DECIMAL(255, 0)) + 1 as VARCHAR(255)) WHERE config_name = 'num_posts'
|
while user registration.
fix:
/**
|
* Set dynamic config value with arithmetic operation.
|
*/
|
function set_config_count($config_name, $increment, $is_dynamic = false)
|
{
|
global $db, $cache;
|
|
switch ($db->sql_layer)
|
{
|
case 'firebird':
|
$sql_update = 'CAST(CAST(config_value as DECIMAL(18, 0)) + ' . (int) $increment . ' as VARCHAR(255))';
|
in file includes/functions.php
- was caused by solution of
-
PHPBB-9173 sql_config_count() artificially limits number scope to 4byte-integer on PostgreSQL and Firebird
- Closed