Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlQuery, addBindValue, LargeBlob problem?
Forum Updated to NodeBB v4.3 + New Features

QSqlQuery, addBindValue, LargeBlob problem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 3 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SPlattenS SPlatten

    @artwaw , is there anyway I can find out? I'm using HeidiSQL to review the database and that looks ok.

    artwawA Offline
    artwawA Offline
    artwaw
    wrote on last edited by
    #4

    @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

    is there anyway I can find out

    Documentation to both, I suppose?

    For more information please re-read.

    Kind Regards,
    Artur

    SPlattenS 1 Reply Last reply
    0
    • artwawA artwaw

      @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

      is there anyway I can find out

      Documentation to both, I suppose?

      SPlattenS Offline
      SPlattenS Offline
      SPlatten
      wrote on last edited by
      #5

      @artwaw, MariaDB certainly supports LARGEBLOB, no errors in HeidiSQL, so it could be the SQL driver I guess...

      Kind Regards,
      Sy

      artwawA 1 Reply Last reply
      0
      • SPlattenS SPlatten

        @artwaw, MariaDB certainly supports LARGEBLOB, no errors in HeidiSQL, so it could be the SQL driver I guess...

        artwawA Offline
        artwawA Offline
        artwaw
        wrote on last edited by
        #6

        @SPlatten How large is the blob in your case? I think I remember reading the advice about large blobs in MariaDB that one should be careful since it is easy to run of memory in the stack or something.
        In other words: might be it is worth to change to QSqlQuery *queryBlock = new QSqlQuery() etc. Again, one of the possibilities, I am not certain what fails there.

        For more information please re-read.

        Kind Regards,
        Artur

        SPlattenS 2 Replies Last reply
        0
        • artwawA artwaw

          @SPlatten How large is the blob in your case? I think I remember reading the advice about large blobs in MariaDB that one should be careful since it is easy to run of memory in the stack or something.
          In other words: might be it is worth to change to QSqlQuery *queryBlock = new QSqlQuery() etc. Again, one of the possibilities, I am not certain what fails there.

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #7

          @artwaw , it will vary, to begin with I'm using small examples, see the size in the post: 34390236

          Kind Regards,
          Sy

          1 Reply Last reply
          0
          • artwawA artwaw

            @SPlatten How large is the blob in your case? I think I remember reading the advice about large blobs in MariaDB that one should be careful since it is easy to run of memory in the stack or something.
            In other words: might be it is worth to change to QSqlQuery *queryBlock = new QSqlQuery() etc. Again, one of the possibilities, I am not certain what fails there.

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by SPlatten
            #8

            @artwaw , the message that appears in dialog:

            Lost connection to MySQL server during query QMYSQL3: Unable to execute statement
            

            And from the event viewer Application:

            Aborted connection 3 to db: 'training' host: 'localhost' (Got a packet bigger than 'max_allowed_packet' bytes)
            

            However in my code I check the array size for < ULONG_MAX which is 4GB before I try to submit it.

            Kind Regards,
            Sy

            Christian EhrlicherC artwawA 2 Replies Last reply
            0
            • SPlattenS SPlatten

              @artwaw , the message that appears in dialog:

              Lost connection to MySQL server during query QMYSQL3: Unable to execute statement
              

              And from the event viewer Application:

              Aborted connection 3 to db: 'training' host: 'localhost' (Got a packet bigger than 'max_allowed_packet' bytes)
              

              However in my code I check the array size for < ULONG_MAX which is 4GB before I try to submit it.

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #9

              @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

              max_allowed_packet

              So hard to search for HeideSQL max_allowed_packet? The first hit gives you the config option...

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              SPlattenS 1 Reply Last reply
              1
              • SPlattenS SPlatten

                @artwaw , the message that appears in dialog:

                Lost connection to MySQL server during query QMYSQL3: Unable to execute statement
                

                And from the event viewer Application:

                Aborted connection 3 to db: 'training' host: 'localhost' (Got a packet bigger than 'max_allowed_packet' bytes)
                

                However in my code I check the array size for < ULONG_MAX which is 4GB before I try to submit it.

                artwawA Offline
                artwawA Offline
                artwaw
                wrote on last edited by
                #10

                @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

                'max_allowed_packet' bytes

                Configuration of the server doesn't permit the size you send.

                For more information please re-read.

                Kind Regards,
                Artur

                SPlattenS 1 Reply Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

                  max_allowed_packet

                  So hard to search for HeideSQL max_allowed_packet? The first hit gives you the config option...

                  SPlattenS Offline
                  SPlattenS Offline
                  SPlatten
                  wrote on last edited by
                  #11

                  @Christian-Ehrlicher , found this https://docs.oracle.com/cd/E19509-01/820-6323/gicxk/index.html, modified my.ini, your so pissy, where you abused as a child?

                  Kind Regards,
                  Sy

                  Christian EhrlicherC 1 Reply Last reply
                  0
                  • artwawA artwaw

                    @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

                    'max_allowed_packet' bytes

                    Configuration of the server doesn't permit the size you send.

                    SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on last edited by
                    #12

                    @artwaw , so I modified my.ini and restarted MariaDB service, now it appears to be ok, thank's for your help.

                    Kind Regards,
                    Sy

                    1 Reply Last reply
                    0
                    • SPlattenS SPlatten

                      @Christian-Ehrlicher , found this https://docs.oracle.com/cd/E19509-01/820-6323/gicxk/index.html, modified my.ini, your so pissy, where you abused as a child?

                      Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

                      your so pissy

                      Because you're to lazy (or whatever) to search for the simplest things before you write a new question which every kid could resolve in less than a minute...

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      SPlattenS 1 Reply Last reply
                      2
                      • Christian EhrlicherC Christian Ehrlicher

                        @SPlatten said in QSqlQuery, addBindValue, LargeBlob problem?:

                        your so pissy

                        Because you're to lazy (or whatever) to search for the simplest things before you write a new question which every kid could resolve in less than a minute...

                        SPlattenS Offline
                        SPlattenS Offline
                        SPlatten
                        wrote on last edited by
                        #14

                        @Christian-Ehrlicher , this forum is a resource full of knowledgeable people, just like a Google search is also a resource, how and what I choose to do is my choice.

                        Kind Regards,
                        Sy

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved