Bug Description: Query on MyISAM table corrupts the table. Work around: Use InnoDB (mysql)$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.9 (Santiago) (mysql)$ uname -a Linux hostname 2.6.32-696.6.3.el6.x86_64 #1 SMP Fri Jun 30 13:24:18 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux MariaDB [pn]> status -------------- mysql Ver 15.1 Distrib 10.2.7-MariaDB, for Linux (x86_64) using readline 5.1 Connection id: 206 Current database: pn Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server: MariaDB Server version: 10.2.7-MariaDB MariaDB Server Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /tmp/mysql.sock Uptime: 14 hours 56 min 43 sec Threads: 8 Questions: 2326 Slow queries: 0 Opens: 150 Flush tables: 1 Open tables: 32 Queries per second avg: 0.043 MariaDB [pn]> select @@log_error; +-----------------------------+ | @@log_error | +-----------------------------+ | /local/mysql/log/mysqld.log | +-----------------------------+ 1 row in set (0.00 sec) (mysql)$ cat /etc/my.cnf [mysqld] datadir=/local/mysql/data socket=/tmp/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 [mysqld_safe] log-error=/local/mysql/log/mysqld.log pid-file=/local/mysql/run/mysqld.pid (mysql)$ mysqld --print-defaults mysqld would have been started with the following arguments: --datadir=/local/mysql/data --socket=/tmp/mysql.sock --user=mysql --symbolic-links=0 MariaDB [mysql]> drop database pn; Query OK, 5 rows affected (0.01 sec) MariaDB [mysql]> create database pn; Query OK, 1 row affected (0.00 sec) MariaDB [pn]> \. pn.August_11_2017_1150.dump MariaDB [pn]> select count(pnmin) from pn_assigned; +--------------+ | count(pnmin) | +--------------+ | 51129 | +--------------+ 1 row in set (0.04 sec) MariaDB [pn]> select * from pn_assigned where pnmin='2135738'; +---------+---------+------------+--------+---------+---------+---------+--------+---------+ | pnmin | pnmax | pndate | pnname | pngroup | pnorder | pnnotes | ipaddr | pnplant | +---------+---------+------------+--------+---------+---------+---------+--------+---------+ | 2135738 | 2135764 | 2017-02-17 | xname | xgroup | xorder | xnotes | | | +---------+---------+------------+--------+---------+---------+---------+--------+---------+ 1 row in set (0.00 sec) MariaDB [pn]> select * from pn_assigned where -> ((pnmin<='2135760' and pnmax>='2135760') -> or (pnmin<='2135790' and pnmax>='2135790') -> or (pnmin>='2135760' and pnmax<='2135790')) order by pnmin; +---------+---------+------------+--------+---------+---------+---------+--------+---------+ | pnmin | pnmax | pndate | pnname | pngroup | pnorder | pnnotes | ipaddr | pnplant | +---------+---------+------------+--------+---------+---------+---------+--------+---------+ | 2135738 | 2135764 | 2017-02-17 | xname | xgroup | xorder | xnotes | | | | 2135765 | 2135765 | 2017-07-27 | xname | xgroup | xorder | xnotes | | | | 2135766 | 2135766 | 2017-07-27 | xname | xgroup | xorder | xnotes | | | | 2135767 | 2135769 | 2017-08-04 | xname | xgroup | xorder | xnotes | | | | 2135770 | 2135770 | 2017-08-11 | xname | xgroup | xorder | xnotes | | | +---------+---------+------------+--------+---------+---------+---------+--------+---------+ 5 rows in set (0.03 sec) MariaDB [pn]> select * from pn_assigned where pnmin='2135738'; +---------+-------+--------+--------+---------+---------+---------+--------+---------+ | pnmin | pnmax | pndate | pnname | pngroup | pnorder | pnnotes | ipaddr | pnplant | +---------+-------+--------+--------+---------+---------+---------+--------+---------+ | 2135738 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | +---------+-------+--------+--------+---------+---------+---------+--------+---------+ 1 row in set (0.00 sec) DROP TABLE IF EXISTS `std_assigned`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `std_assigned` ( `std_num` int(10) unsigned NOT NULL, `std_class` varchar(4) DEFAULT NULL, `std_date` datetime DEFAULT NULL, `std_name` varchar(30) DEFAULT NULL, `std_ecn` varchar(15) DEFAULT NULL, `std_descr` varchar(128) DEFAULT NULL, `std_ipaddr` varchar(15) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;