From 4a0f2563d3d1747a4704e6241380071efbeb3882 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 8 May 2013 14:32:32 +0200 Subject: MDEV-4462 mysqld gets SIGFPE when mysql.user table is empty avoid divison by zero --- mysql-test/t/empty_user_table.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mysql-test/t/empty_user_table.test (limited to 'mysql-test/t/empty_user_table.test') diff --git a/mysql-test/t/empty_user_table.test b/mysql-test/t/empty_user_table.test new file mode 100644 index 00000000000..7e672cc64f6 --- /dev/null +++ b/mysql-test/t/empty_user_table.test @@ -0,0 +1,18 @@ +# +# MDEV-4462 mysqld gets SIGFPE when mysql.user table is empty +# + +source include/not_embedded.inc; + +create table t1 as select * from mysql.user; +truncate table mysql.user; +flush privileges; + +--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT +--error ER_ACCESS_DENIED_ERROR +connect (fail,localhost,u1); + +insert mysql.user select * from t1; +drop table t1; +flush privileges; + -- cgit v1.2.1