Bug #26369 merge base table marked as crash on windows
Submitted: 14 Feb 2007 15:02 Modified: 2 Apr 2007 14:16
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Merge storage engine Severity:S3 (Non-critical)
Version:5.0.36BK OS:Windows (windows)
Assigned to: Iggy Galarza CPU Architecture:Any
Tags: crashed, merge

[14 Feb 2007 15:02] Shane Bester
Description:
Looks to be a windows mysqld specific bug, probably due to the file sharing/open modes used.

the testcase causes base table to be marked as crashed on windows, but
not on linux.

on windows we have
----
mysql> repair table t1;
+---------+--------+----------+------------------------+
| Table   | Op     | Msg_type | Msg_text               |
+---------+--------+----------+------------------------+
| test.t1 | repair | error    | 13 for record at pos 7 |
| test.t1 | repair | status   | Operation failed       |
+---------+--------+----------+------------------------+
----

on linux we have
---
mysql> repair table t1;
+----------+--------+----------+----------+
| Table    | Op     | Msg_type | Msg_text |
+----------+--------+----------+----------+
| mysql.t1 | repair | status   | OK       |
+----------+--------+----------+----------+
1 row in set (0.00 sec)
-----

How to repeat:
flush tables;
drop table if exists m1;
drop table if exists t1;
create table t1(id int)engine=myisam;
create table m1(id int)engine=merge union=(t1) insert_method=last;
flush tables;
insert into m1(id) values (9);
insert into t1(id) values (8);
flush tables;
lock table m1 write, t1 write;
flush tables;
repair table t1;
flush tables;
unlock tables;

Suggested fix:
.
[17 Feb 2007 19:54] MySQL Verification Team
the debug version of mysqld crashes with debug assertion

Attachment: bug26369_debug_assertions_windows_5.0.36_stack.txt (text/plain), 2.45 KiB.

[17 Feb 2007 19:57] MySQL Verification Team
Windows debug version of 5.0.36 crashes with a runtime assertion:

Debug Assertion Failed!

Program: C:\build\mysql-5.0.36-win-src\client_Debug\mysqld-debug.exe
File: lseeki64.c
Line: 78

Expression: (fh >= 0 && (unsigned)_nhandle)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
[2 Apr 2007 8:21] MySQL Verification Team
this seems fixed in my 5.0.40. not sure who fixed it