我们最近对我们的网站进行了一些更改,以准备进行预生产:
- 迁移到负载平衡架构
- 现在使用 memcache/memcached 来维护会话数据
- 启用 APC
现在,一切正常,直到我们进行了一些我们无法回忆的更改,导致数据库无法正确加载模式。这是一些调试的输出:
Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 684]
Query: SHOW FULL COLUMNS FROM
Warning (2): Invalid argument supplied for foreach() [APP/models/datasources/dbo/dbo_mysql.php, line 127]
Warning (2): array_keys() expects parameter 1 to be array, boolean given [CORE/cake/libs/model/datasources/dbo_source.php, line 1968]
Notice (8): Trying to get property of non-object [CORE/cake/libs/model/datasources/dbo_source.php, line 812]
Query: SHOW FULL COLUMNS FROM
Query: SHOW FULL COLUMNS FROM
Query: SHOW FULL COLUMNS FROM
Query: SHOW FULL COLUMNS FROM
Query: SHOW FULL COLUMNS FROM
Query: SHOW FULL COLUMNS FROM
如您所见,它没有加载表名。
我们注意到的另一个问题是,当查询生成时,它是这样生成的:
SELECT Project.id FROM AS Project WHERE 1=1
请注意,没有表名,它只是尝试在空白表名上创建别名。
有什么想法吗?