Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package mariadb-connector-c for 
openSUSE:Factory checked in at 2024-07-03 20:28:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mariadb-connector-c (Old)
 and      /work/SRC/openSUSE:Factory/.mariadb-connector-c.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mariadb-connector-c"

Wed Jul  3 20:28:36 2024 rev:48 rq:1184319 version:3.3.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/mariadb-connector-c/mariadb-connector-c.changes  
2024-03-09 20:54:51.694977677 +0100
+++ 
/work/SRC/openSUSE:Factory/.mariadb-connector-c.new.18349/mariadb-connector-c.changes
       2024-07-03 20:29:26.815191071 +0200
@@ -1,0 +2,7 @@
+Thu Jun 27 14:43:28 UTC 2024 - Antonio Teixeira <antonio.teixe...@suse.com>
+
+- Update to 3.3.10:
+  * https://mariadb.com/kb/en/mariadb-connector-c-3-3-10-release-notes/
+- Remove fix-build-gcc14.patch (fixed upstream)
+
+-------------------------------------------------------------------

Old:
----
  fix-build-gcc14.patch
  mariadb-connector-c-3.3.8-src.tar.gz
  mariadb-connector-c-3.3.8-src.tar.gz.asc

New:
----
  mariadb-connector-c-3.3.10-src.tar.gz
  mariadb-connector-c-3.3.10-src.tar.gz.asc

BETA DEBUG BEGIN:
  Old:  * https://mariadb.com/kb/en/mariadb-connector-c-3-3-10-release-notes/
- Remove fix-build-gcc14.patch (fixed upstream)
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mariadb-connector-c.spec ++++++
--- /var/tmp/diff_new_pack.aPYlRb/_old  2024-07-03 20:29:27.323209664 +0200
+++ /var/tmp/diff_new_pack.aPYlRb/_new  2024-07-03 20:29:27.327209811 +0200
@@ -25,7 +25,7 @@
 %endif
 %bcond_with sqlite3
 Name:           mariadb-connector-c
-Version:        3.3.8
+Version:        3.3.10
 Release:        0
 Summary:        MariaDB connector in C
 License:        LGPL-2.1-or-later
@@ -38,7 +38,6 @@
 Source3:        baselibs.conf
 Patch1:         mariadb-connector-c-2.3.1_unresolved_symbols.patch
 Patch4:         private_library.patch
-Patch5:         fix-build-gcc14.patch
 BuildRequires:  cmake
 BuildRequires:  curl-devel
 BuildRequires:  pkgconfig

++++++ mariadb-connector-c-3.3.8-src.tar.gz -> 
mariadb-connector-c-3.3.10-src.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/.travis.yml 
new/mariadb-connector-c-3.3.10-src/.travis.yml
--- old/mariadb-connector-c-3.3.8-src/.travis.yml       2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/.travis.yml      2024-05-10 
10:26:44.000000000 +0200
@@ -1,10 +1,5 @@
-os: linux
-dist: focal
 language: c
-services: docker
-addons:
-  hosts:
-    - mariadb.example.com
+version: ~> 1.0
 
 cache:
   apt: true
@@ -12,98 +7,22 @@
   directories:
     - $HOME/docker
 
-before_install:
-  - git clone https://github.com/mariadb-corporation/connector-test-machine.git
-  # Load cached docker images
-  - if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} 
sh -c "zcat {file} | docker load"; fi
+env:
+  global: local=0 DB=testc CLEAR_TEXT=0
 
-install:
-  - |-
-    if [ -z "$server_branch" ] ; then
-      case $TRAVIS_OS_NAME in
-        windows)
-          connector-test-machine/launch.bat -t "$srv" -v "$v" -d testc
-          ;;
-        linux)
-          source connector-test-machine/launch.sh -t "$srv" -v "$v" -d testc 
-l "$local" -n "$native"
-          ;;
-      esac
-    fi
-
-
-env: local=0
-
-stages:
-  - Minimal
-  - name: Enterprise
-    if: type = push AND fork = false
-  - Community
+import: mariadb-corporation/connector-test-machine:common-build.yml@master
 
 jobs:
-  fast_finish: true
-  allow_failures:
-    - env: srv=maxscale
-    - env: srv=skysql
-    - env: srv=skysql-ha
-    - env: srv=xpand
-    - env: srv=mysql v=5.7
-    - env: srv=mysql v=8.0
   include:
-    - stage: Minimal
-      env: srv=mariadb v=10.6 packet=8
-      name: "CS 10.6"
-    - env: srv=mariadb-es
-      name: "ES latest"
-      if: type = push AND fork = false
-    - env: server_branch=10.11
-      name: "10.11 Server unit testing"
-
-    - stage: Enterprise
-      env: srv=mariadb-es v=10.4
-      dist: bionic
-      name: "ES 10.4"
-    - env: srv=mariadb-es v=10.5
-      dist: bionic
-      name: "ES 10.5"
-    - env: srv=mariadb-es v=10.6
-      name: "ES 10.6"
-    - env: srv=mariadb-es-test v=23.08
-      name: "ES 23.08"
-    - env: srv=maxscale
-      name: "Maxscale"
-    - env: srv=xpand
-      name: "Xpand"
-
     - stage: Community
-      env: srv=mariadb v=10.11
-      os: windows
-      language: shell
-      name: "Windows"
-    - env: server_branch=10.6
-      name: "10.6 Server unit testing"
+      env: srv=mariadb v=10.11 local=1 TEST_OPTION=--ps-protocol
+      name: "CS 10.11 with ps-protocol"
+    - stage: Other
+      env: server_branch=10.6
+      name: "CS 10.6 Server unit testing"
+    - env: server_branch=10.11
+      name: "CS 10.11 Server unit testing"
     - env: server_branch=11.3 TEST_OPTION=--ps-protocol
       name: "11.3 Server unit testing with ps-protocol"
-    - env: srv=mariadb v=10.4 local=1
-      dist: bionic
-      name: "CS 10.4"
-    - env: srv=mariadb v=10.5 local=1
-      dist: bionic
-      name: "CS 10.5"
-    - env: srv=mariadb v=10.9 local=1
-      name: "CS 10.9"
-    - env: srv=mariadb v=10.10 local=1
-      name: "CS 10.10"
-    - env: srv=mariadb v=10.11 local=1
-      name: "CS 10.11"
-    - env: srv=mariadb v=10.11 local=1 TEST_OPTION=--ps-protocol
-      name: "CS 10.11 with ps-protocol"
-    - env: srv=mariadb v=11.0 local=1
-      name: "CS 11.0"
-    - env: srv=mariadb v=11.1 local=1
-      name: "CS 11.1"
-    - env: srv=mysql v=5.7 native=1
-      name: "MySQL 5.7"
-    - env: srv=mysql v=8.0 native=1
-      name: "MySQL 8.0"
 
 script: ./travis.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/CMakeLists.txt 
new/mariadb-connector-c-3.3.10-src/CMakeLists.txt
--- old/mariadb-connector-c-3.3.8-src/CMakeLists.txt    2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/CMakeLists.txt   2024-05-10 
10:26:44.000000000 +0200
@@ -36,7 +36,7 @@
 
 SET(CPACK_PACKAGE_VERSION_MAJOR 3)
 SET(CPACK_PACKAGE_VERSION_MINOR 3)
-SET(CPACK_PACKAGE_VERSION_PATCH 8)
+SET(CPACK_PACKAGE_VERSION_PATCH 10)
 SET(CPACK_PACKAGE_VERSION 
"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 MATH(EXPR MARIADB_PACKAGE_VERSION_ID "${CPACK_PACKAGE_VERSION_MAJOR} * 10000 +
                             ${CPACK_PACKAGE_VERSION_MINOR} * 100   +
@@ -395,7 +395,7 @@
 MESSAGE1(SYSTEM_LIBS "SYSTEM_LIBS ${SYSTEM_LIBS}")
 MARK_AS_ADVANCED(SYSTEM_LIBS)
 
-IF(NOT IS_SUBPROJECT)
+IF(NOT IS_SUBPROJECT AND (NOT DEFINED CMAKE_COMPILE_WARNING_AS_ERROR))
 IF ((NOT WIN32) AND (CMAKE_C_COMPILER_ID MATCHES "Clang" OR 
CMAKE_C_COMPILER_ID MATCHES "GNU"))
   SET(WARNING_AS_ERROR "-Werror")
 ELSEIF(CMAKE_C_COMPILER_ID MATCHES "MSVC")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/cmake/FindZStd.cmake 
new/mariadb-connector-c-3.3.10-src/cmake/FindZStd.cmake
--- old/mariadb-connector-c-3.3.8-src/cmake/FindZStd.cmake      2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/cmake/FindZStd.cmake     2024-05-10 
10:26:44.000000000 +0200
@@ -10,7 +10,7 @@
   HINTS ${ZSTD_ROOT_DIR}/include)
 
 find_library(ZSTD_LIBRARIES
-  NAMES zstd
+  NAMES zstd zstd_static
   HINTS ${ZSTD_ROOT_DIR}/lib)
 
 include(FindPackageHandleStandardArgs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/include/CMakeLists.txt 
new/mariadb-connector-c-3.3.10-src/include/CMakeLists.txt
--- old/mariadb-connector-c-3.3.8-src/include/CMakeLists.txt    2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/include/CMakeLists.txt   2024-05-10 
10:26:44.000000000 +0200
@@ -17,7 +17,6 @@
 ENDIF()
 SET(MYSQL_ADDITIONAL_INCLUDES
    ${CC_SOURCE_DIR}/include/mysql/client_plugin.h
-   ${CC_SOURCE_DIR}/include/mysql/plugin_auth_common.h
    ${CC_SOURCE_DIR}/include/mysql/plugin_auth.h
    )
 SET(MARIADB_ADDITIONAL_INCLUDES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/include/errmsg.h 
new/mariadb-connector-c-3.3.10-src/include/errmsg.h
--- old/mariadb-connector-c-3.3.8-src/include/errmsg.h  2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/include/errmsg.h 2024-05-10 
10:26:44.000000000 +0200
@@ -114,10 +114,11 @@
 #define CR_BINLOG_ERROR 5021
 #define CR_BINLOG_INVALID_FILE 5022
 #define CR_BINLOG_SEMI_SYNC_ERROR 5023
+#define CR_INVALID_CLIENT_FLAG 5024
 
 /* Always last, if you add new error codes please update the
    value for CR_MARIADB_LAST_ERROR */
-#define CR_MARIADB_LAST_ERROR CR_BINLOG_INVALID_FILE
+#define CR_MARIADB_LAST_ERROR CR_INVALID_CLIENT_FLAG
 
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/include/ma_hash.h 
new/mariadb-connector-c-3.3.10-src/include/ma_hash.h
--- old/mariadb-connector-c-3.3.8-src/include/ma_hash.h 1970-01-01 
01:00:00.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/include/ma_hash.h        2024-05-10 
10:26:44.000000000 +0200
@@ -0,0 +1,22 @@
+#ifndef _ma_hash_h_
+#define _ma_hash_h_
+
+/*! Hash algorithms */
+#define MA_HASH_MD5       1
+#define MA_HASH_SHA1      2
+#define MA_HASH_SHA224    3
+#define MA_HASH_SHA256    4
+#define MA_HASH_SHA384    5
+#define MA_HASH_SHA512    6
+
+/*! Hash digest sizes */
+#define MA_MD5_HASH_SIZE 16
+#define MA_SHA1_HASH_SIZE 20
+#define MA_SHA224_HASH_SIZE 28
+#define MA_SHA256_HASH_SIZE 32
+#define MA_SHA384_HASH_SIZE 48
+#define MA_SHA512_HASH_SIZE 64
+
+#define MA_MAX_HASH_SIZE 64
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/include/mariadb_com.h 
new/mariadb-connector-c-3.3.10-src/include/mariadb_com.h
--- old/mariadb-connector-c-3.3.8-src/include/mariadb_com.h     2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/include/mariadb_com.h    2024-05-10 
10:26:44.000000000 +0200
@@ -205,11 +205,17 @@
                                  CLIENT_MULTI_STATEMENTS |\
                                  CLIENT_MULTI_RESULTS |\
                                  CLIENT_PROGRESS |\
-                                CLIENT_SSL_VERIFY_SERVER_CERT |\
+                                 CLIENT_SSL_VERIFY_SERVER_CERT |\
                                  CLIENT_REMEMBER_OPTIONS |\
                                  CLIENT_PLUGIN_AUTH |\
                                  CLIENT_SESSION_TRACKING |\
                                  CLIENT_CONNECT_ATTRS)
+#define CLIENT_ALLOWED_FLAGS     (CLIENT_SUPPORTED_FLAGS |\
+                                 CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA |\
+                                 CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS |\
+                                 CLIENT_ZSTD_COMPRESSION |\
+                                 CLIENT_PS_MULTI_RESULTS |\
+                                 CLIENT_REMEMBER_OPTIONS)
 #define CLIENT_CAPABILITIES        (CLIENT_MYSQL | \
                                  CLIENT_LONG_FLAG |\
                                  CLIENT_TRANSACTIONS |\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/include/mysql/client_plugin.h 
new/mariadb-connector-c-3.3.10-src/include/mysql/client_plugin.h
--- old/mariadb-connector-c-3.3.8-src/include/mysql/client_plugin.h     
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/include/mysql/client_plugin.h    
2024-05-10 10:26:44.000000000 +0200
@@ -122,7 +122,7 @@
 } MARIADB_PVIO_PLUGIN;
 
 /******** authentication plugin specific declarations *********/
-#include <mysql/plugin_auth_common.h>
+#include <mysql/plugin_auth.h>
 
 struct st_mysql_client_plugin_AUTHENTICATION
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/include/mysql/plugin_auth_common.h 
new/mariadb-connector-c-3.3.10-src/include/mysql/plugin_auth_common.h
--- old/mariadb-connector-c-3.3.8-src/include/mysql/plugin_auth_common.h        
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/include/mysql/plugin_auth_common.h       
1970-01-01 01:00:00.000000000 +0100
@@ -1,110 +0,0 @@
-/* Copyright (C) 2010 Sergei Golubchik and Monty Program Ab
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-   
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-   
-   You should have received a copy of the GNU Library General Public
-   License along with this library; if not, write to the Free
-   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02111-1301, USA */
-
-
-#ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
-/**
-  @file
-
-  This file defines constants and data structures that are the same for
-  both client- and server-side authentication plugins.
-*/
-#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
-
-/** the max allowed length for a user name */
-#define MYSQL_USERNAME_LENGTH 512
-
-/**
-  return values of the plugin authenticate_user() method.
-*/
-
-/**
-  Authentication failed. Additionally, all other CR_xxx values
-  (libmariadb error code) can be used too.
-
-  The client plugin may set the error code and the error message directly
-  in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
-  code was returned, an error message in the MYSQL structure will be
-  overwritten. If CR_ERROR is returned without setting the error in MYSQL,
-  CR_UNKNOWN_ERROR will be user.
-*/
-#define CR_ERROR 0
-/**
-  Authentication (client part) was successful. It does not mean that the
-  authentication as a whole was successful, usually it only means
-  that the client was able to send the user name and the password to the
-  server. If CR_OK is returned, the libmariadb reads the next packet expecting
-  it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
-*/
-#define CR_OK -1
-/**
-  Authentication was successful.
-  It means that the client has done its part successfully and also that
-  a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
-  In this case, libmariadb will not read a packet from the server,
-  but it will use the data at mysql->net.read_pos.
-
-  A plugin may return this value if the number of roundtrips in the
-  authentication protocol is not known in advance, and the client plugin
-  needs to read one packet more to determine if the authentication is finished
-  or not.
-*/
-#define CR_OK_HANDSHAKE_COMPLETE -2
-
-typedef struct st_plugin_vio_info
-{
-  enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
-         MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
-#ifndef _WIN32
-  int socket;     /**< it's set, if the protocol is SOCKET or TCP */
-#else
-  SOCKET socket;     /**< it's set, if the protocol is SOCKET or TCP */
-  HANDLE handle;  /**< it's set, if the protocol is PIPE or MEMORY */
-#endif
-} MYSQL_PLUGIN_VIO_INFO;
-
-/**
-  Provides plugin access to communication channel
-*/
-typedef struct st_plugin_vio
-{
-  /**
-    Plugin provides a pointer reference and this function sets it to the
-    contents of any incoming packet. Returns the packet length, or -1 if
-    the plugin should terminate.
-  */
-  int (*read_packet)(struct st_plugin_vio *vio, 
-                     unsigned char **buf);
-  
-  /**
-    Plugin provides a buffer with data and the length and this
-    function sends it as a packet. Returns 0 on success, 1 on failure.
-  */
-  int (*write_packet)(struct st_plugin_vio *vio, 
-                      const unsigned char *packet, 
-                      int packet_len);
-
-  /**
-    Fills in a st_plugin_vio_info structure, providing the information
-    about the connection.
-  */
-  void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
-
-} MYSQL_PLUGIN_VIO;
-
-#endif
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/libmariadb/ma_default.c 
new/mariadb-connector-c-3.3.10-src/libmariadb/ma_default.c
--- old/mariadb-connector-c-3.3.8-src/libmariadb/ma_default.c   2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/libmariadb/ma_default.c  2024-05-10 
10:26:44.000000000 +0200
@@ -135,6 +135,7 @@
 end:
   return configuration_dirs;
 error:
+  release_configuration_dirs();
   return NULL;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/libmariadb/ma_errmsg.c 
new/mariadb-connector-c-3.3.10-src/libmariadb/ma_errmsg.c
--- old/mariadb-connector-c-3.3.8-src/libmariadb/ma_errmsg.c    2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/libmariadb/ma_errmsg.c   2024-05-10 
10:26:44.000000000 +0200
@@ -53,7 +53,7 @@
 /* 2023 */  "",
 /* 2024 */  "",
 /* 2025 */  "",
-/* 2026 */  "TLS/SSL error: %-.100s",
+/* 2026 */  "TLS/SSL error: %s",
 /* 2027 */  "Received malformed packet",
 /* 2028 */  "",
 /* 2029 */  "",
@@ -118,6 +118,7 @@
   /* 5021 */ "Binary log error (File: %.*s start_pos=%ld): %s.",
   /* 5022 */ "File '%s' is not a binary log file",
   /* 5023 */ "Semi sync request error: %s",
+  /* 5024 */ "Invalid client flags (%lu) specified. Supported flags: %lu",
   ""
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/libmariadb/mariadb_async.c 
new/mariadb-connector-c-3.3.10-src/libmariadb/mariadb_async.c
--- old/mariadb-connector-c-3.3.8-src/libmariadb/mariadb_async.c        
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/libmariadb/mariadb_async.c       
2024-05-10 10:26:44.000000000 +0200
@@ -140,7 +140,7 @@
 {
   int ssl_err;
   b->events_to_wait_for= 0;
-  if (res >= 0)
+  if (res > 0)
     return 1;
   ssl_err= SSL_get_error(ssl, res);
   if (ssl_err == SSL_ERROR_WANT_READ)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/libmariadb/mariadb_lib.c 
new/mariadb-connector-c-3.3.10-src/libmariadb/mariadb_lib.c
--- old/mariadb-connector-c-3.3.8-src/libmariadb/mariadb_lib.c  2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/libmariadb/mariadb_lib.c 2024-05-10 
10:26:44.000000000 +0200
@@ -241,18 +241,29 @@
         }
         goto restart;
       }
-      net->last_errno= last_errno;
-      if (pos[0]== '#')
+      if (IS_MYSQL_ERROR(last_errno) || IS_MARIADB_ERROR(last_errno))
       {
-        ma_strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH);
-        pos+= SQLSTATE_LENGTH + 1;
+        /* The server appears to have sent an error code within the
+         * range(s) of error codes that should only be generated
+         * client-side.
+         */
+        my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0);
       }
       else
       {
-        strncpy(net->sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH);
+        net->last_errno= last_errno;
+        if (pos[0]== '#')
+        {
+          ma_strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH);
+          pos+= SQLSTATE_LENGTH + 1;
+        }
+        else
+        {
+          strncpy(net->sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH);
+        }
+        ma_strmake(net->last_error,(char*) pos,
+                min(len,sizeof(net->last_error)-1));
       }
-      ma_strmake(net->last_error,(char*) pos,
-              min(len,sizeof(net->last_error)-1));
     }
     else
     {
@@ -699,6 +710,7 @@
   {{MARIADB_OPT_TLS_PASSPHRASE}, MARIADB_OPTION_STR, "tls-passphrase"},
   {{MYSQL_OPT_SSL_ENFORCE}, MARIADB_OPTION_BOOL, "tls-enforce"},
   {{MYSQL_OPT_SSL_VERIFY_SERVER_CERT}, MARIADB_OPTION_BOOL,"tls-verify-peer"},
+  {{MARIADB_OPT_RESTRICTED_AUTH}, MARIADB_OPTION_STR, "restricted-auth"},
   {{0}, 0, NULL}
 };
 
@@ -1422,6 +1434,14 @@
   char *connection_handler= (mysql->options.extension) ?
                             mysql->options.extension->connection_handler : 0;
 
+  if ((client_flag & CLIENT_ALLOWED_FLAGS) != client_flag)
+  {
+    my_set_error(mysql, CR_INVALID_CLIENT_FLAG, SQLSTATE_UNKNOWN,
+                 ER(CR_INVALID_CLIENT_FLAG),
+                 client_flag, CLIENT_ALLOWED_FLAGS);
+    return NULL;
+  }
+
   if (!mysql->methods)
     mysql->methods= &MARIADB_DEFAULT_METHODS;
 
@@ -1787,11 +1807,24 @@
  */
   if ((pkt_length=ma_net_safe_read(mysql)) == packet_error)
   {
-    if (mysql->net.last_errno == CR_SERVER_LOST)
+
+    unsigned int code= mysql->net.last_errno;
+    if (code == CR_SERVER_LOST)
       my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN,
                  ER(CR_SERVER_LOST_EXTENDED),
                  "handshake: reading initial communication packet",
                  errno);
+    else if (IS_MYSQL_ERROR(code) || IS_MARIADB_ERROR(code))
+      ; /* not forged - generated on the client side */
+    else if (mysql->options.use_ssl)
+    {
+      char last_error[sizeof(mysql->net.last_error)];
+      strcpy(last_error, mysql->net.last_error);
+      my_set_error(mysql, CR_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
+                   "Received error packet before completion of TLS handshake. "
+                   "The authenticity of the following error cannot be 
verified: %d - %s",
+                   code, last_error);
+    }
 
     goto error;
   }
@@ -1803,17 +1836,6 @@
   mysql->protocol_version= end[0];
   end++;
 
-  /* Check if server sends an error */
-  if (mysql->protocol_version == 0XFF)
-  {
-    net_get_error(end, pkt_length - 1, net->last_error, 
sizeof(net->last_error),
-      &net->last_errno, net->sqlstate);
-    /* fix for bug #26426 */
-    if (net->last_errno == 1040)
-      memcpy(net->sqlstate, "08004", SQLSTATE_LENGTH);
-    goto error;
-  }
-
   if (mysql->protocol_version <  PROTOCOL_VERSION)
   {
     net->last_errno= CR_VERSION_ERROR;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/libmariadb/secure/openssl.c 
new/mariadb-connector-c-3.3.10-src/libmariadb/secure/openssl.c
--- old/mariadb-connector-c-3.3.8-src/libmariadb/secure/openssl.c       
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/libmariadb/secure/openssl.c      
2024-05-10 10:26:44.000000000 +0200
@@ -533,7 +533,7 @@
 {
   int ssl_err;
   b->events_to_wait_for= 0;
-  if (res >= 0)
+  if (res > 0)
     return 1;
   ssl_err= SSL_get_error(ssl, res);
   if (ssl_err == SSL_ERROR_WANT_READ)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-c-3.3.8-src/plugins/io/remote_io.c 
new/mariadb-connector-c-3.3.10-src/plugins/io/remote_io.c
--- old/mariadb-connector-c-3.3.8-src/plugins/io/remote_io.c    2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/plugins/io/remote_io.c   2024-05-10 
10:26:44.000000000 +0200
@@ -279,11 +279,11 @@
   MA_REMOTE_FILE *rf;
   (void)operation;
  
-  if (!(file = (MA_FILE *)calloc(sizeof(MA_FILE), 1)))
+  if (!(file = (MA_FILE *)calloc(1, sizeof(MA_FILE))))
     return NULL;
  
   file->type= MA_FILE_REMOTE;
-  if (!(file->ptr= rf= (MA_REMOTE_FILE *)calloc(sizeof(MA_REMOTE_FILE), 1)))
+  if (!(file->ptr= rf= (MA_REMOTE_FILE *)calloc(1, sizeof(MA_REMOTE_FILE))))
   {
     free(file);
     return NULL; 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/plugins/pvio/pvio_npipe.c 
new/mariadb-connector-c-3.3.10-src/plugins/pvio/pvio_npipe.c
--- old/mariadb-connector-c-3.3.8-src/plugins/pvio/pvio_npipe.c 2023-11-01 
11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/plugins/pvio/pvio_npipe.c        
2024-05-10 10:26:44.000000000 +0200
@@ -150,19 +150,38 @@
   return GetOverlappedResult(file, ov, size, FALSE);
 }
 
+/*
+  Disable posting IO completion event to the port.
+  Handle can be bound to IOCP outside of the connector for other purposes
+  (e.g polling functionality)
+*/
+
+static inline void disable_iocp_notification(HANDLE *h)
+{
+  *h= (HANDLE) ((ULONG_PTR) *h | 1);
+}
+
+static inline void enable_iocp_notification(HANDLE *h)
+{
+  *h= (HANDLE) ((ULONG_PTR) *h & ~1);
+}
+
 ssize_t pvio_npipe_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
 {
   BOOL ret;
   ssize_t r= -1;
   struct st_pvio_npipe *cpipe= NULL;
   DWORD size;
+  HANDLE *h;
 
   if (!pvio || !pvio->data)
     return -1;
 
   cpipe= (struct st_pvio_npipe *)pvio->data;
-
+  h= &cpipe->overlapped.hEvent;
+  disable_iocp_notification(h);
   ret= ReadFile(cpipe->pipe, buffer, (DWORD)length, NULL, &cpipe->overlapped);
+  enable_iocp_notification(h);
   ret= complete_io(cpipe->pipe, &cpipe->overlapped, ret, 
pvio->timeout[PVIO_READ_TIMEOUT], &size);
   r= ret? (ssize_t) size:-1;
 
@@ -175,13 +194,15 @@
   struct st_pvio_npipe *cpipe= NULL;
   BOOL ret;
   DWORD size;
-
+  HANDLE *h;
   if (!pvio || !pvio->data)
     return -1;
 
   cpipe= (struct st_pvio_npipe *)pvio->data;
-
+  h= &cpipe->overlapped.hEvent;
+  disable_iocp_notification(h);
   ret= WriteFile(cpipe->pipe, buffer, (DWORD)length, NULL , 
&cpipe->overlapped);
+  enable_iocp_notification(h);
   ret= complete_io(cpipe->pipe, &cpipe->overlapped, ret, 
pvio->timeout[PVIO_WRITE_TIMEOUT], &size);
   r= ret ? (ssize_t)size : -1;
   return r;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/plugins/pvio/pvio_socket.c 
new/mariadb-connector-c-3.3.10-src/plugins/pvio/pvio_socket.c
--- old/mariadb-connector-c-3.3.8-src/plugins/pvio/pvio_socket.c        
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/plugins/pvio/pvio_socket.c       
2024-05-10 10:26:44.000000000 +0200
@@ -39,7 +39,7 @@
 #include <sys/un.h>
 #endif
 #ifdef HAVE_POLL
-#include <sys/poll.h>
+#include <poll.h>
 #endif
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/plugins/trace/trace_example.c 
new/mariadb-connector-c-3.3.10-src/plugins/trace/trace_example.c
--- old/mariadb-connector-c-3.3.8-src/plugins/trace/trace_example.c     
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/plugins/trace/trace_example.c    
2024-05-10 10:26:44.000000000 +0200
@@ -132,7 +132,7 @@
       info= (TRACE_INFO *)info->next;
   }
 
-  if (!(info= (TRACE_INFO *)calloc(sizeof(TRACE_INFO), 1)))
+  if (!(info= (TRACE_INFO *)calloc(1, sizeof(TRACE_INFO))))
     return NULL;
   info->thread_id= thread_id;
   info->next= trace_info;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/bulk1.c 
new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/bulk1.c
--- old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/bulk1.c       
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/bulk1.c      
2024-05-10 10:26:44.000000000 +0200
@@ -74,8 +74,8 @@
 
   /* allocate memory */
   buffer= calloc(TEST_ARRAY_SIZE, sizeof(char *));
-  lengths= (unsigned long *)calloc(sizeof(long), TEST_ARRAY_SIZE);
-  vals= (unsigned int *)calloc(sizeof(int), TEST_ARRAY_SIZE);
+  lengths= calloc(TEST_ARRAY_SIZE, sizeof *lengths);
+  vals= calloc(TEST_ARRAY_SIZE, sizeof *vals);
 
   for (i=0; i < TEST_ARRAY_SIZE; i++)
   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/charset.c 
new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/charset.c
--- old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/charset.c     
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/charset.c    
2024-05-10 10:26:44.000000000 +0200
@@ -47,6 +47,9 @@
   MYSQL_RES *res;
   MYSQL_ROW row;
 
+  /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */
+  SKIP_MAXSCALE;
+
   len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4);
   FAIL_IF(memcmp(out, TEST_BUG8378_OUT, len), "wrong result");
 
@@ -791,6 +794,10 @@
   MYSQL_ROW row;
   int found= 0;
   int mdev27266= 0;
+  int unsupported[]= {
+                      579, /* utf8mb3_general1400_as_ci added in 11.5 */
+                      611, /* utf8mb4_general1400_as_ci added in 11.5 */
+                      0};
 
   SKIP_MYSQL(mysql);
 
@@ -836,8 +843,11 @@
       id= atoi(row[0]);
       if (!mariadb_get_charset_by_nr(id))
       {
-        diag("%04d %s %s", id, row[1], row[2]);
+        int j=0;
         found++;
+        for (j=0; unsupported[j]; j++)
+          if (unsupported[j] == id)
+            found--;
       }
     }
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/connection.c 
new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/connection.c
--- old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/connection.c  
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/connection.c 
2024-05-10 10:26:44.000000000 +0200
@@ -1222,6 +1222,9 @@
   int rc;
   FILE *fp;
 
+  /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */
+  SKIP_MAXSCALE;
+
   if (!(fp= fopen("./mdev13100.cnf", "w")))
     return FAIL;
 
@@ -1240,6 +1243,7 @@
     diag("Error: %s", mysql_error(mysql));
     return FAIL;
   }
+  diag("Default charset: %s", mysql_character_set_name(mysql));
   FAIL_IF(strcmp("latin2", mysql_character_set_name(mysql)), "Expected charset 
latin2");
   mysql_close(mysql);
 
@@ -2190,6 +2194,7 @@
         {
           MARIADB_CONST_STRING *str= va_arg(ap, MARIADB_CONST_STRING *);
           strncpy(data->database, str->str, str->length);
+          data->database[str->length]= 0;
         }
         break;
       case SESSION_TRACK_SYSTEM_VARIABLES:
@@ -2200,6 +2205,7 @@
           if (!strncmp(key->str, "character_set_client", key->length))
           {
             strncpy(data->charset, val->str, val->length);
+            data->charset[val->length]= 0;
           }
         }
         break;
@@ -2301,7 +2307,33 @@
   return OK;
 }
 
+static int test_conc505(MYSQL *my __attribute__((unused)))
+{
+  MYSQL *mysql= mysql_init(NULL);
+
+#define CLIENT_DEPRECATE_EOF (1ULL << 24)
+
+  if (my_test_connect(mysql, hostname, username, password, schema, port, 
socketname, CLIENT_DEPRECATE_EOF))
+  {
+    diag("Error expected: Invalid client flag");
+    mysql_close(mysql);
+    return FAIL;
+  }
+  diag("Error (expected): %s", mysql_error(mysql));
+  FAIL_IF(mysql_errno(mysql) != CR_INVALID_CLIENT_FLAG, "Wrong error number");
+  if (!my_test_connect(mysql, hostname, username, password, schema, port, 
socketname, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS))
+  {
+    diag("Error: %s", mysql_error(mysql));
+    mysql_close(mysql);
+    return FAIL;
+  }
+
+  mysql_close(mysql);
+  return OK;
+}
+
 struct my_tests_st my_tests[] = {
+  {"test_conc505", test_conc505, TEST_CONNECTION_NONE, 0, NULL, NULL},
   {"test_conc632", test_conc632, TEST_CONNECTION_NONE, 0, NULL, NULL},
   {"test_status_callback", test_status_callback, TEST_CONNECTION_NONE, 0, 
NULL, NULL},
   {"test_conc365", test_conc365, TEST_CONNECTION_NONE, 0, NULL, NULL},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/ps_bugs.c 
new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/ps_bugs.c
--- old/mariadb-connector-c-3.3.8-src/unittest/libmariadb/ps_bugs.c     
2023-11-01 11:28:04.000000000 +0100
+++ new/mariadb-connector-c-3.3.10-src/unittest/libmariadb/ps_bugs.c    
2024-05-10 10:26:44.000000000 +0200
@@ -3257,7 +3257,7 @@
 
 static int test_mem_overun(MYSQL *mysql)
 {
-  char       buffer[10000], field[12];
+  char       buffer[10000], field[20];
   MYSQL_STMT *stmt;
   MYSQL_RES  *field_res, *res;
   int        rc, i, length;
@@ -5159,7 +5159,7 @@
   MYSQL_STMT *stmt= mysql_stmt_init(mysql);
   MYSQL_BIND* bind;
 
-  bind = calloc(sizeof(MYSQL_BIND), 65535);
+  bind = calloc(65535, sizeof *bind);
 
   rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
   check_mysql_rc(rc, mysql);

Reply via email to