Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25526

CentOS 7 + PHP PDO + MariaDB randomly empty SELECT result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 10.2.37, 10.3.28, 10.4.18, 10.5.9
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
      None

      Description

      I spent many many days and weeks with very very specific and random problem.

      CREATE TABLE IF NOT EXISTS `datas`
      (
      `id` varchar(32) NOT NULL,
      `access` int(10) unsigned DEFAULT NULL,
      `data` text NULL,
      PRIMARY KEY (`session_id`)
      ) ROW_FORMAT = DYNAMIC
      ENGINE = InnoDB
      DEFAULT CHARSET = utf8mb4
      COLLATE = utf8mb4_unicode_ci;
      

      Put data like this:

      INSERT INTO `datas` VALUES ('18041vivf9us088dluinh6ip02', 1619455120, 'd/lQRoGhOEIQn+bFpfZkfg==:Tzu6URdU5qSRh3ih4cfU6w==');
      

      Then create PHP PDO connection and simple query like into test.php:

      SELECT * FROM datas WHERE id="18041vivf9us088dluinh6ip02";

      Create cron like this:

      "* * * * * php74 /path_to_script/test.php"
      

      I believe that after some time you will see that php fetchAll() or fetch() will return empty result.

      After I replaced DB to MySQL 5.7 than result will ALWAYS return requested row.

      I think that some combination broken MariaDB stability, because my VPS server has enough memory, enough cpu capacity, enough disk space. Other services working well, no other problem and soo on. PHP is from Remi repository for example 7.4 version. MariaDB repo is original mariadb. I tested with all, but my main test was on 10.5.9 version. Tested on CentOS Linux release 7.9.2009 (Core). Core Linux 3.10.0-1160.21.1.el7.x86_64 (SMP).

        Attachments

          Activity

            People

            Assignee:
            cvicentiu Vicențiu Ciorbaru
            Reporter:
            standus stanley h
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration