Bug #13210 create function crashes server
Submitted: 15 Sep 2005 2:41 Modified: 15 Sep 2005 3:57
Reporter: dave mausner Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.12-nt OS:Windows (win 2000)
Assigned to: MySQL Verification Team CPU Architecture:Any

[15 Sep 2005 2:41] dave mausner
SQL create function crashes server. entire mysql session below. no tables or data required.

How to repeat:
mysql> \s
C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe  Ver 14.12 Distrib 5.0.12-beta, for Win32 (ia32)
Connection id:          1
Current database:       mysql
Current user:           root@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.0.12-beta-nt
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
TCP port:               3306
Uptime:                 21 min 17 sec

Threads: 1  Questions: 14  Slow queries: 0  Opens: 2  Flush tables: 1  Open tabl
es: 2  Queries per second avg: 0.011
mysql> delimiter //
mysql> create function xyz(p1 int) returns int
    -> return 2*p1;
    -> //
create function xyz(p1 int) returns int
return 2*p1;

ERROR 2013 (HY000): Lost connection to MySQL server during query

Suggested fix:
[15 Sep 2005 3:04] dave mausner
bug 12824 is similar.  but where is the script mentioned there?  it speaks of updating the system tables.
[15 Sep 2005 3:57] MySQL Verification Team
Duplicate as bug:


:\mysql\bin>mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.12-beta-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> delimiter //
mysql> create function xyz(p1 int) returns int
    -> return 2*p1;
    -> //
Query OK, 0 rows affected (0.19 sec)

mysql> select xyz(4)//
| xyz(4) |
|      8 |
1 row in set (0.06 sec)