Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103252

segment fault when using MySQL in qt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 6.3.0
    • SQL Support
    • None
    • Windows

    Description

      I was using MySQL in qt and try to use "select" sentence. When the query was destructing, it told me a segment fault appeared in the 431th line of  \src\plugins\sqldrivers\mysql\qsql_mysql.cpp. To solve it, i changed 

      if(qIsTimeOrDate(field.myField->type)) {
            reinterpret_cast<MYSQL_TIME*>(field.outField)->~MYSQL_TIME();
      }

      to

      if(field.myField != 0) 
      {
           if(qIsTimeOrDate(field.myField->type)) 
           {  
                reinterpret_cast<MYSQL_TIME*>(field.outField)->~MYSQL_TIME(); 
           } 
      }
      

      and compile the .dll file. And the problem was solved.

       

       

      Attachments

        1. 2222.PNG
          172 kB
          abc abc

        Activity

          People

            chehrlic Christian Ehrlicher
            lbc abc abc
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: