InnoDB - 丢失mysql事务数据 - InnoDB:数据库没有正常关闭

时间:2012-11-09 06:00:28

标签: php mysql mysqli wamp

我正在尝试在php和mysql中做一个小应用程序。

问题: 数据库损坏,我随机丢失数据。 始终丢失的数据是交易的一部分,绝不是完整的交易,只是交易的一部分。

有关应用程序的信息: Wampserver用于Windows 7计算机上的基本设置。 该机器是个人桌面。 该应用程序不会在线托管,它将始终运行本地服务器。

这是mysql日志的一部分

121108 19:19:57 [Note] wampmysqld: ready for connections.
Version: '5.5.24-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
121109 10:09:56 [Note] Plugin 'FEDERATED' is disabled.
121109 10:09:56 InnoDB: The InnoDB memory heap is disabled
121109 10:09:56 InnoDB: Mutexes and rw_locks use Windows interlocked functions
121109 10:09:56 InnoDB: Compressed tables use zlib 1.2.3
121109 10:09:56 InnoDB: Initializing buffer pool, size = 128.0M
121109 10:09:56 InnoDB: Completed initialization of buffer pool
121109 10:09:56 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
121109 10:09:56  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 659637, file name .\mysql-bin.000056
121109 10:09:58  InnoDB: Waiting for the background threads to start
121109 10:09:59 InnoDB: 1.1.8 started; log sequence number 6158775
121109 10:09:59 [Note] Recovering after a crash using mysql-bin
121109 10:09:59 [Note] Starting crash recovery...
121109 10:09:59 [Note] Crash recovery finished.
121109 10:09:59 [Note] Server hostname (bind-address): '(null)'; port: 3306
121109 10:09:59 [Note]   - '(null)' resolves to '::';
121109 10:09:59 [Note]   - '(null)' resolves to '0.0.0.0';
121109 10:09:59 [Note] Server socket created on IP: '0.0.0.0'.
121109 10:09:59 [Note] Event Scheduler: Loaded 0 events
121109 10:09:59 [Note] wampmysqld: ready for connections.
Version: '5.5.24-log'  socket: ''  port: 3306  MySQL Community Server (GPL)

这是我正在使用的代码 - PHP CODE

请注意:

  • 我不确定我的代码或其他内容是否有问题。
  • 代码不好,这是我第一次写超过2行的PHP。
  • 需要检查的代码是从第11行到第198行
  • 丢失数据的mysql查询位于第176行

感谢任何帮助。

0 个答案:

没有答案