Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.17, 5.5.42
    • Component/s: Compiling
    • Labels:
    • Environment:
      CentOS, Fedora, RHEL

      Description

      Function cli_safe_read is very important for custom client software, which do read DB answer. Without this function you can not implement custom slave library:

      https://github.com/dimarik/mysqlslave

      Moreover, some other projects need it, for example Facebook's HipHop:
      http://nareshv.blogspot.in/2011/10/building-facebooks-hiphop-on-fedora-15.html

      It's easy to add cli_safe_read function to export list in libmysql/CMakeLists.txt

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            okay. I'll export cli_safe_read() and net_field_length(), but rename them to have mysql_ prefix.
            mysql_net_read_packet() and mysql_net_field_length().

            Show
            serg Sergei Golubchik added a comment - okay. I'll export cli_safe_read() and net_field_length(), but rename them to have mysql_ prefix. mysql_net_read_packet() and mysql_net_field_length().
            Hide
            pianisteg Alexander Pankov added a comment -

            Thanks!

            It is good idea to use prefixes, but how can I detect which function I have?

            Are there any defines to check whether I have to user function with prefix or not?

            Show
            pianisteg Alexander Pankov added a comment - Thanks! It is good idea to use prefixes, but how can I detect which function I have? Are there any defines to check whether I have to user function with prefix or not?
            Hide
            serg Sergei Golubchik added a comment -

            You can do, say

            #if MYSQL_VERSION_ID > 50541 && defined(MARIADB_BASE_VERSION)
            /* MariaDB-5.5.42 or later, with low-level mysql_net_ API */
            #else
            #define mysql_net_read_packet cli_safe_read
            #define mysql_net_field_length net_field_length
            #endif
            
            Show
            serg Sergei Golubchik added a comment - You can do, say # if MYSQL_VERSION_ID > 50541 && defined(MARIADB_BASE_VERSION) /* MariaDB-5.5.42 or later, with low-level mysql_net_ API */ # else #define mysql_net_read_packet cli_safe_read #define mysql_net_field_length net_field_length #endif
            Hide
            pianisteg Alexander Pankov added a comment -

            One more question, have you merged thinge to 10.0.x and 10.1.x branches?

            Show
            pianisteg Alexander Pankov added a comment - One more question, have you merged thinge to 10.0.x and 10.1.x branches?
            Hide
            serg Sergei Golubchik added a comment -

            No, I have not. But, of course, I will. This change will be in the next 10.0 release. And in the next 10.1 that follows in the next 10.0 release. That is, in 10.0.17 and 10.1.4

            Show
            serg Sergei Golubchik added a comment - No, I have not. But, of course, I will. This change will be in the next 10.0 release. And in the next 10.1 that follows in the next 10.0 release. That is, in 10.0.17 and 10.1.4

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                pianisteg Alexander Pankov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: