对于非常小的(4char)值

时间:2017-08-30 04:55:53

标签: mysql redbean zurmocrm

在运行相当平均的操作时,我的应用程序崩溃并显示错误消息:

[error] [exception.RedBean_Exception_SQL] [22003] - SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`zurmo`.`account_read`.`count` - 1)'

这个错误使我感到困惑,因为它与来自this question的错误消息类似,但是对于 MUCH 更小的值/字符数。更令人困惑的是,我知道数据库中有更大的常规int值。

现在,我可以进一步详细了解application,但这似乎不是应用程序甚至数据库界面(redbean)的问题,即使它们是都标记在这里。

有关更多信息,请参阅堆栈跟踪:

REQUEST_URI=/app/index.php/zurmo/role/details?id=4
HTTP_REFERER=https://************/app/index.php/zurmo/role/details?id=4
---
2017/08/30 07:27:57 [warning] [application] Exception class: RedBean_Exception_SQL
#0 /var/www/html/redbean/rb.php(777): RedBean_Driver_PDO->runQuery('update account_...', Array)
#1 /var/www/html/redbean/rb.php(1779): RedBean_Driver_PDO->Execute('update account_...', Array)
#2 /var/www/html/redbean/rb.php(7534): RedBean_Adapter_DBAdapter->exec('update account_...', Array)
#3 /var/www/html/redbean/rb.php(7440): RedBean_Facade::query('exec', 'update account_...', Array)
#4 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(962): RedBean_Facade::exec('update account_...')
#5 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1022): ReadPermissionsOptimizationUtil::decrementCount('account_read', 19716, Object(Role))
#6 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1053): ReadPermissionsOptimizationUtil::decrementParentRolesCounts('account_read', 19716, Object(Role))
#7 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(668): ReadPermissionsOptimizationUtil::bulkDecrementParentRolesCounts('account_read', Array, Object(Role))
#8 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(604): ReadPermissionsOptimizationUtil::roleParentSetOrRemoved(false, Object(Role))
#9 /var/www/html/app/protected/modules/zurmo/utils/AllPermissionsOptimizationUtil.php(357): ReadPermissionsOptimizationUtil::roleParentBeingRemoved(Object(Role))
#10 /var/www/html/app/protected/modules/zurmo/models/Role.php(181): AllPermissionsOptimizationUtil::roleParentBeingRemoved(Object(Role))
#11 /var/www/html/app/protected/core/models/RedBeanModel.php(1909): Role->beforeSave()
#12 /var/www/html/app/protected/modules/zurmo/models/Item.php(123): RedBeanModel->save(false, NULL)
#13 /var/www/html/app/protected/modules/zurmo/utils/ZurmoControllerUtil.php(162): Item->save(false)
#14 /var/www/html/app/protected/modules/zurmo/utils/ZurmoControllerUtil.php(109): ZurmoControllerUtil->saveModelFromSanitizedData(Array, Object(Role), false, 'Philippines Des...', false)
#15 /var/www/html/app/protected/modules/zurmo/components/ZurmoBaseController.php(738): ZurmoControllerUtil->saveModelFromPost(Array, Object(Role), false, 'Philippines Des...', false)
#16 /var/www/html/app/protected/modules/zurmo/controllers/RoleController.php(99): ZurmoBaseController->attemptToSaveModelFromPost(Object(Role))
#17 /var/www/html/app/protected/modules/zurmo/controllers/RoleController.php(74): ZurmoRoleController->actionEdit('4')
#18 [internal function]: ZurmoRoleController->actionDetails('4')
#19 /var/www/html/yii/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Object(ZurmoRoleController), Array)
#20 /var/www/html/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Object(ZurmoRoleController), Object(ReflectionMethod), Array)
#21 /var/www/html/yii/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#22 /var/www/html/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(Object(CInlineAction))
#23 /var/www/html/yii/framework/web/filters/CFilter.php(40): CFilterChain->run()
#24 /var/www/html/yii/framework/web/filters/CFilterChain.php(130): CFilter->filter(Object(CFilterChain))
#25 /var/www/html/yii/framework/web/CController.php(291): CFilterChain->run()
#26 /var/www/html/yii/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#27 /var/www/html/yii/framework/web/CWebApplication.php(286): CController->run('details')
#28 /var/www/html/yii/framework/web/CWebApplication.php(141): CWebApplication->runController('zurmo/role/deta...')
#29 /var/www/html/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#30 /var/www/html/app/protected/core/components/WebApplication.php(88): CApplication->run()
#31 /var/www/html/app/index.php(75): WebApplication->run()
#32 {main}

可以采取哪些措施来解决这个问题?我觉得它与数据库的配置有某种关系,但我不知道该怎么看它。

1 个答案:

答案 0 :(得分:0)

计数可能是“保留”'元件。

SHOW CREATE TABLE table_name可能包含一些关键数据类型的详细信息。

在SO中搜索SQLSTATE 22003,您会发现许多以前的经验,其中许多解决了错误消息的解决方案。