A solution for MySQL Assertion failure FIL_NULL

A solution for MySQL Assertion failure FIL_NULL

http://michaelfranzl.com/2014/01/25/solution-mysql-assertion-failure-fil_null/

A defective RAM module recently caused data corruption in MySQL tables. MySQL would log the following to /var/log/syslog  in regular intervals, about every few minutes:

1

2

3

140125 5:04:41 InnoDB: Assertion failure in thread 140046518261504 in file fut0lst.ic line 83

InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA

InnoDB: We intentionally generate a memory trap.

Reading MySQL documentation and various blogs didn’t help much. I ran CHECK TABLES  on all the tables and they all reported OK. Then I ran

1

mysqlcheck --all-databases

and still all tables reported OK. Nevertheless the Assertion Failures continued. Then I stumbled across this excellent blog post, which suggested to dump evertying into a .sql file, wipe/var/lib/mysql (not without making a backup, mind you!), and re-import everything from scratch. This is what I did and it worked.

I recorded the passwords for each database and collected it into a SQL script like this:

1

2

3

GRANT ALL PRIVILEGES ON database_name1 TO ‘username1‘@‘localhost‘ IDENTIFIED BY ‘password1‘;

GRANT ALL PRIVILEGES ON database_name2 TO ‘username2‘@‘localhost‘ IDENTIFIED BY ‘password2‘;

etc.

When you dump all databases into a .sql file, it will not dump the permissions, so you will need to restore them later with this script. Next, the dumping part, then removal and reinstallation of mysql (Danger here: When you remove mysql-server, all packges which depend on it also will be removed!):

1

2

3

4

5

6

cd ~

mysqldump -u root -ppass --all-databases > alldbs.sql

cd /var/lib

cp -vpr mysql mysql-backup

apt-get remove --purge mysql-server-5.5

apt-get install mysql-server

Here, I had to reset the MySQL admin password because it didn’t work any more, so I ran:

1

dpkg-reconfigure mysql-server-5.5

Then, I re-imported all databases from the dump file:

1

2

cd ~

mysql -u root -ppass < alldbs.sql

Then I run the SQL permission script that I mention above.

For me, this resulted in no more Assertion Failures. Yay!

时间: 2024-10-10 01:21:05

A solution for MySQL Assertion failure FIL_NULL的相关文章

Delphi2007 在Win10 下运行报错 Assertion failure

Delphi2007 原来安装在Win7 下 运行正常, 自从升级到Win10 ,新建工程运行然后关闭报错, 报错信息如下: ---------------------------bds.exe - bordbk105N.dll---------------------------Assertion failure: "(!"SetThreadContext failed")"in ..\win32src\thread32.cpp at line 412Contin

Assertion failure in -[UIView layoutSublayersOfLayer:]

Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2935.137/UIView.m:8803(ios7系统) 解决方法:重写对应UIView(假如上面的UIView是UIProgressView)的 layoutSublayersOfLayer 并且调用[self layoutSubViews]; 当当前UIView的子控件布局完自动约束后调用 layoutIfNeeded 例如这里

IOS之Bug--关于Assertion failure in -[UIApplication _runWithMainScene

出现的问题: 解决方式是将出现的bug信息Assertion failure in -[UIApplication _runWithMainScene....这前面部分拷贝到Google搜索引擎一搜索就有:

iOS Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:]

Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318/UITableView.m:10772 这问题是由于cell高度负数导致,去看看: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

解决:CWnd::SetWindowText报Assertion failure

参考资料: http://www.cnblogs.com/tiancun/p/3756581.html http://www.tc5u.com/mfc/2120698.htm http://forums.codeguru.com/showthread.php?379745-setwindowtext-in-cdialog-ctor-causes-assertion-to-fail 出错代码: 1 CInfoDlg dlg; 2 dlg.GetDlgItem(IDC_STATIC)->SetWin

Assertion failure in UITableViewCell layoutSublayersOfLayer解决办法

iOS6 设备在更新UITableViewCell的时候遇到了 Assertion failure in -[UITableViewCell layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2380.17/UIView.m:5776 的问题, 解决方法是,把UITableViewCell里面的控件的添加方式由 [self addSubview:self.titleLabel]; 改成 [self.contentView addSubview:

Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]

今天做一个tableView动态单元格遇到一个这么个问题.  Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/... 因为 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 这个函数的返回值是个

iOS Assertion failure in [MyClass layoutSublayersOfLayer:]

// 某自定义的view的layoutSubviews方法 - (void)layoutSubviews { [super layoutSubviews]; // 执行完[super layoutSubviews]后,写约束代码,在iOS7下会崩溃,报  Assertion failure in [MyClass layoutSublayersOfLayer:],iOS8下则是正常的. } 修改方法,把[super layoutSubviews];放在后面,像下面这样 - (void)layou

*** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory

报错提示: *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UICollectionView.m:3307 *** Terminating app due to uncaught exception 'NSInternalInconsis