Bug #49610 help use the mysql 5.1.41
Submitted: 11 Dec 2009 6:29 Modified: 11 Dec 2009 7:19
Reporter: zmcsdh zmcsdh Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.41 OS:Any
Assigned to: CPU Architecture:Any
Tags: help use the mysql 5.1.41

[11 Dec 2009 6:29] zmcsdh zmcsdh
Description:
create table userpass ( user char(8) primary key, password char(32));//

drop trigger if exists in_bf_userpass;//
create trigger in_bf_userpass before insert on userpass
for each row begin
set new.password = md5(NEW.password);
end
//
drop trigger if exists up_bf_userpass;//
create trigger up_bf_userpass before update on userpass
for each row begin
set new.password=md5(new.password);
end
//
insert into userpass values('km','km');//

How to repeat:
mysql> insert into userpass values('km','km');//
ERROR 1436 (HY000): Thread stack overrun:  7176 bytes used of a 131072 byte stac
k, and 128000 bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger
stack.
[11 Dec 2009 7:01] Valeriy Kravchuk
Please, check with a newer version, 5.1.41, amd inform about the results. Look:

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -proot -P3310 test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.1.41-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> delimiter //
mysql> create table userpass ( user char(8) primary key, password char(32));//
Query OK, 0 rows affected (0.20 sec)

mysql> drop trigger if exists in_bf_userpass;//
Query OK, 0 rows affected, 1 warning (0.08 sec)

mysql> create trigger in_bf_userpass before insert on userpass
    -> for each row begin
    -> set new.password = md5(NEW.password);
    -> end
    -> //
Query OK, 0 rows affected (0.16 sec)

mysql> drop trigger if exists up_bf_userpass;//
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> create trigger up_bf_userpass before update on userpass
    -> for each row begin
    -> set new.password=md5(new.password);
    -> end
    -> //
Query OK, 0 rows affected (0.11 sec)

mysql> insert into userpass values('km','km');//
Query OK, 1 row affected (0.22 sec)
[11 Dec 2009 7:06] zmcsdh zmcsdh
C:\Users\Administrator>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.41-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> delimiter //

mysql> use end //
Database changed
mysql> create table userpass ( user char(8) primary key, password char(32));//
ERROR 1050 (42S01): Table 'userpass' already exists
mysql>
mysql> drop trigger if exists in_bf_userpass;//
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> create trigger in_bf_userpass before insert on userpass
    -> for each row begin
    -> set new.password = md5(NEW.password);
    -> end
    -> //
Query OK, 0 rows affected (0.01 sec)

mysql> drop trigger if exists up_bf_userpass;//
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> create trigger up_bf_userpass before update on userpass
    -> for each row begin
    -> set new.password=md5(new.password);
    -> end
    -> //
Query OK, 0 rows affected (0.01 sec)

mysql> insert into userpass values('km','km');//
ERROR 1436 (HY000): Thread stack overrun:  7176 bytes used of a 131072 byte stac
k, and 128000 bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger
stack.
mysql>
[11 Dec 2009 7:10] zmcsdh zmcsdh
C:\Users\Administrator>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.41-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use end;
Database changed
mysql> delimiter //
mysql> //
ERROR:
No query specified

mysql> create table userpass ( user char(8) primary key, password char(32));//
Query OK, 0 rows affected (0.06 sec)

mysql>
mysql> drop trigger if exists in_bf_userpass;//
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> create trigger in_bf_userpass before insert on userpass
    -> for each row begin
    -> set new.password = md5(NEW.password);
    -> end
    -> //
Query OK, 0 rows affected (0.01 sec)

mysql> drop trigger if exists up_bf_userpass;//
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> create trigger up_bf_userpass before update on userpass
    -> for each row begin
    -> set new.password=md5(new.password);
    -> end
    -> //
Query OK, 0 rows affected (0.01 sec)

mysql> insert into userpass values('km','km');//
ERROR 1436 (HY000): Thread stack overrun:  7176 bytes used of a 131072 byte stac
k, and 128000 bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger
stack.
mysql>
[11 Dec 2009 7:19] zmcsdh zmcsdh
use the my-small.ini !!!!!