Bug#8321 - myisampack bug in compression algorithm This is the second of three changesets. It contains the pure bug fix. It also contains the second after-review fixes. The problem was that with gcc on x86, shifts are done modulo word size.  'value' is 32 bits wide and shifting it by 32 bits is a no-op. This was triggered by an evil distribution of character incidences.  A distribution of 2917027827 characters made of 202 distinct values led to 34 occurrences of 32-bit Huffman codes. This might have been the first time ever that write_bits() had to write 32-bit values. Since it can be expected that one day even 32 bits might be insufficient, the third changeset suggests to enlarge some variables to 64 bits.
Bug#8321 - myisampack bug in compression algorithm
This is the second of three changesets. It contains the pure bug fix.
It also contains the second after-review fixes.
The problem was that with gcc on x86, shifts are done modulo word size. 
'value' is 32 bits wide and shifting it by 32 bits is a no-op.
This was triggered by an evil distribution of character incidences. 
A distribution of 2917027827 characters made of 202 distinct values led to
34 occurrences of 32-bit Huffman codes.
This might have been the first time ever that write_bits() had to write
32-bit values. Since it can be expected that one day even 32 bits might
be insufficient, the third changeset suggests to enlarge some variables
to 64 bits.

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