Bug #32905 problem with DESCRIBE / Errcode: 17 / my_thread_global_end()
Submitted: 2 Dec 2007 3:42 Modified: 2 Dec 2007 10:36
Reporter: Carsten Wiedmann Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.45-community-nt OS:Microsoft Windows (XP SP2)
Assigned to:

[2 Dec 2007 3:42] Carsten Wiedmann

during my work with some PEAR classes (DB_Table_Generator or MDB2_Driver_Reverse), I've found a problem, which I also can reproduce with the shell client "mysql".

It's a standard (new for testing) MySQL installation with default-charset UTF-8 and STRICT mode on. The server "mysqld-nt.exe" is running as service.

I have this behaviour also with older versions like 5.0.27.

System information:
Kernel version:            Microsoft Windows XP, Multiprocessor Free
Product type:              Professional
Product version:           5.1
Service pack:              2
Kernel build number:       2600
Processors:                2
Processor speed:           2.9 GHz
Processor type:            Intel(R) Pentium(R) 4 CPU
Physical memory:           1022 MB

I have this problem also with another P4 HT, but not with older P4 or P3 (don't have a real dual-core).

How to repeat:
With this batchfile:
| :start
| mysql -u root -D mysql -e "DESCRIBE `user`;"
| goto start

After a different count of loops, I can see the error message:
> D:\MySQL\bin>mysql -u root -D mysql -e "DESCRIBE `user`;"
> ERROR 1 (HY000) at line 1:
> Can't create/write to file '#sql_1674_0.MYD' (Errcode: 17)
(and I must restart the server)

If I want stop this batch after the first loops with ctrl-c, I get this error message:
> Error in my_thread_global_end(): 1 threads didn't exit

With this batchfile:
| :start
| mysql -u root -D mysql -e "SELECT * FROM `user`;"
| goto start

This batch runs forever and I can stop it with ctrl-c without an error message.
[2 Dec 2007 8:34] Sveta Smirnova
Thank you for the report. Error 17 is duplicate of Bug #31781 and my_thread_global_end is duplicate of bug #25621
[2 Dec 2007 10:36] Carsten Wiedmann
Just to clarify that:

> Error 17 is duplicate of Bug #31781
Bug #31781 is about CREATE and UPDATE, and I have a simple DESCRIBE or SHOW statement.

> my_thread_global_end is duplicate of bug #25621
Bug #25621 is a) closed and b) it's about some clients (PHP) which uses the shared libraray "libmysql.dll".
I have this with "mysql", which don't use "libmysql.dll".

I can also not read in both bugs, the the cause from both is the same problem (maybe something is not thread safe in the server and/or a memory is not freed).

Just an additional question:
The Error 17 occurs during creation a temporary table (after some loops). Why does:
| DESCRIBE `user`;"
need a temporaray table. I can't find this information at [1].

I have also tried to raise these values:
| tmp_table_size      = 512M
| max_heap_table_size = 512M
The temporary table is still created. So much memory for a simple information statement?


[1] http://dev.mysql.com/doc/refman/5.0/en/internal-temporary-tables.html
[2 Dec 2007 10:49] Sveta Smirnova
Bug #31781 is not about update, but about temporary tables creation mechanism.

If my_thread_global_end problem is repeatable with next Community release fill free to reopen the report.