Backport into build-201003230706-5.1.43sp1
Backport into build-201003230706-5.1.43sp1

> ------------------------------------------------------------
> revno: 3302.1.1
> revision-id: kristofer.pettersson@sun.com-20100113113900-o3m4jcm4l6qzum57
> parent: dao-gang.qu@sun.com-20091231040419-i5dnn06ahs256qcy
> committer: Kristofer Pettersson <kristofer.pettersson@sun.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Wed 2010-01-13 12:39:00 +0100
> message:
>   Bug#33982 debug assertion and crash reloading grant tables after sighup or kill
>   
>   In certain rare cases when a process was interrupted
>   during a FLUSH PRIVILEGES operation the diagnostic
>   area would be set to an error state but the function
>   responsible for the operation would still signal
>   success. This would lead to a debug assertion error
>   later on when the server would attempt to reset the
>   DA before sending the error message.
>   
>   This patch fixes the issue by assuring that
>   reload_acl_and_cache() always fails if an error
>   condition is raised.
>   
>   The second issue was that a KILL could cause
>   a console error message which referred to a DA
>   state without first making sure that such a
>   state existed.
>   
>   This patch fixes this issue in two different
>   palces by first checking DA state before
>   fetching the error message.
>   
>    

flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,ollie314/server,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,davidl-zend/zenddbi,slanterns/server,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,ollie314/server,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2