Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24193

ODBC items whose SQL queries with Chinese search conditions return incorrect results after proxy restart

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.0.26
    • Proxy (P), Server (S)
    • None
    • RHEL 8.3
      odbc driver: msodbcsql18-18.3.2.1-1.x86_64

      Within the first hour after the proxy restarts, ODBC items whose SQL queries with Chinese search conditions return incorrect results.
      The targeting database here is MSSQL (Microsoft SQL Server).

      Steps to reproduce:

      1. To compare query results for the same record, three ODBC items were created, using different SQL query statement:

          Query with Chinese search condition:

      select count(*) from ... where [job].[description] like '%无描述%' 

          Query with English search condition:

      select count(*) from ... where [job].[job_id] like '%-DA86-%' 

          Query for content:

      select [job].[job_id], [job].[description] from ... 

          refer screenshots: item-odbc-chinese.jpg, item-odbc-english.jpg, item-odbc-detail.jpg

       

      2. Confirm that the above three items can synchronously get correct query results before the proxy restarts.

          Due to the presence of actual data records, whether using Chinese or English search conditions, the returned row count consistently shows as 1.

          refer screenshots: data-beforeRestart-odbc-chinese.jpg, data-beforeRestart-english.jpg, data-beforeRestart-odbc-detail.jpg

       

      3. restart proxy

      sudo systemctl restart zabbix-proxy 

      Result:

      • Item with Chinese search condition, the returned row count sometimes showing as 0 (incorrect result) and other times as 1.
      • Item with English search condition, the returned row count consistently shows as 1. 
      • Item with content consistently shows the presence of record.

        refer screenshots: data-afterRestart-odbc-chinese.png, data-afterRestart-odbc-english.png, data-afterRestart-odbc-detail.png

       

      Expected:

        In our environment, business monitoring usually involves Chinese search conditions, and it is essential that the returned results are accurate. 

        1. 0307-data-item.jpg
          0307-data-item.jpg
          74 kB
        2. 0307-isql-cmd.jpg
          0307-isql-cmd.jpg
          56 kB
        3. 0307-isql-script.jpg
          0307-isql-script.jpg
          62 kB
        4. 0307-item-connstring.jpg
          0307-item-connstring.jpg
          129 kB
        5. 0307-restart-proxy.jpg
          0307-restart-proxy.jpg
          135 kB
        6. charset.png
          charset.png
          456 kB
        7. data-afterRestart-odbc-chinese.png
          data-afterRestart-odbc-chinese.png
          134 kB
        8. data-afterRestart-odbc-detail.png
          data-afterRestart-odbc-detail.png
          265 kB
        9. data-afterRestart-odbc-english.png
          data-afterRestart-odbc-english.png
          124 kB
        10. data-beforeRestart-english.jpg
          data-beforeRestart-english.jpg
          87 kB
        11. data-beforeRestart-odbc-chinese.jpg
          data-beforeRestart-odbc-chinese.jpg
          83 kB
        12. data-beforeRestart-odbc-detail.jpg
          data-beforeRestart-odbc-detail.jpg
          177 kB
        13. image-2024-03-07-08-21-23-342.png
          image-2024-03-07-08-21-23-342.png
          66 kB
        14. image-2024-03-07-08-21-58-342.png
          image-2024-03-07-08-21-58-342.png
          66 kB
        15. image-2024-03-08-09-43-42-233.png
          image-2024-03-08-09-43-42-233.png
          74 kB
        16. item-odbc-chinese.jpg
          item-odbc-chinese.jpg
          110 kB
        17. item-odbc-detail.jpg
          item-odbc-detail.jpg
          96 kB
        18. item-odbc-english.jpg
          item-odbc-english.jpg
          109 kB
        19. query_result.log
          2 kB
        20. restart-proxy.jpg
          restart-proxy.jpg
          124 kB
        21. version-odbc.jpg
          version-odbc.jpg
          25 kB

            mkudlacz Michal Kudlacz
            ShangFu Shuang Fu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: