Bug #17721 Test 'exampledb' hangs on Windows
Submitted: 26 Feb 2006 1:39 Modified: 8 Mar 2006 16:31
Reporter: Kent Boortz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.7-beta OS:Windows (Windows)
Assigned to: Magnus Blåudd CPU Architecture:Any

[26 Feb 2006 1:39] Kent Boortz
Description:
The test case hangs, when manually killing the server show 
it was likely hanging in the query

At line 11: query 'CREATE TABLE t1 (
  Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
  Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE=example'

failed: 2013: Lost connection to MySQL server during query

How to repeat:
Run the 'exampledb' test on Windows
[26 Feb 2006 23:38] Magnus Blåudd
Some kind of v-table problem when using the plugin handler example.

In rea_create_table, a call is made to the virtual function handler::create_handler_files. It's default implementation is to return FALSE but the call ends up in handler::optimize_partitions.

>	mysqld-debug.exe!handler::optimize_partitions(THD * thd=0x029de880)  Line 1821	C++
 	mysqld-debug.exe!rea_create_table(THD * thd=0x0240fa40, const char * path=0x029de880, const char * db=0x00f9d838, const char * table_name=0x02430158, st_ha_create_information * create_info=0x02410058, List<create_field> & create_fields={...}, unsigned int keys=0, st_key * key_info=0x024305e0, handler * file=0x024304f0)  Line 333 + 0x12	C++
 	mysqld-debug.exe!mysql_create_table_internal(THD * thd=0x0240fa40, const char * db=0x00f9d838, const char * table_name=0x02430158, st_ha_create_information * create_info=0x02410058, List<create_field> & fields={...}, List<Key> & keys={...}, int internal_tmp_table=0, unsigned int select_field_count=0)  Line 2231 + 0x2c	C++
 	mysqld-debug.exe!mysql_create_table(THD * thd=0x0240fa40, const char * db=0x00f9d838, const char * table_name=0x02430158, st_ha_create_information * create_info=0x02410058, List<create_field> & fields={...}, List<Key> & keys={...}, int internal_tmp_table=0, unsigned int select_field_count=0)  Line 2312 + 0x25	C++
 	mysqld-debug.exe!mysql_execute_command(THD * thd=0x0240fa40)  Line 2902 + 0x3e	C++
 	mysqld-debug.exe!mysql_parse(THD * thd=0x0240fa40, char * inBuf=0x02430088, unsigned int length=152)  Line 5773 + 0x9	C++
 	mysqld-debug.exe!dispatch_command(enum_server_command command=COM_QUERY, THD * thd=0x0240fa40, char * packet=0x02427fd9, unsigned int packet_length=153)  Line 1740 + 0x1d	C++
 	mysqld-debug.exe!do_command(THD * thd=0x0240fa40)  Line 1536 + 0x31	C++
 	mysqld-debug.exe!handle_one_connection(void * arg=0x0240fa40)  Line 1178 + 0x9	C++
[26 Feb 2006 23:48] Magnus Blåudd
Probably caused by "ifdef"s in handler class for WITH_PARTITION_STORAGE_ENGINE

Thus if ha_example is compiled withoutthe above define it will see a different vtable and the function pointers will be wrong.

Add the define WITH_PARTITION_STORAGE_ENGINE to the "example" project in the mysql solution.
[27 Feb 2006 1:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3169
[27 Feb 2006 10:57] Magnus Blåudd
Patch that removes ifdef's from handler class is on it's way.
[27 Feb 2006 13:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3184
[6 Mar 2006 10:32] Magnus Blåudd
Pushed to 5.1.8

Removed conditional defines that affected the handler class, which is used as an external interface for storage engine plugins and should thus not change depending on what defines are used to compile.
[6 Mar 2006 10:32] Magnus Blåudd
Pushed to 5.1.8

Removed conditional defines that affected the handler class, which is used as an external interface for storage engine plugins and should thus not change depending on what defines are used to compile.
[8 Mar 2006 16:31] Paul DuBois
Noted in 5.1.8 changelog.

The <literal>EXAMPLE</literal> storage engine did not work
on Windows. (Bug #17721)