Hello community,

here is the log from the commit of package mariadb-connector-odbc for 
openSUSE:Factory checked in at 2018-02-22 15:03:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mariadb-connector-odbc (Old)
 and      /work/SRC/openSUSE:Factory/.mariadb-connector-odbc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mariadb-connector-odbc"

Thu Feb 22 15:03:48 2018 rev:5 rq:578961 version:3.0.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/mariadb-connector-odbc/mariadb-connector-odbc.changes
    2018-01-16 09:43:06.247628919 +0100
+++ 
/work/SRC/openSUSE:Factory/.mariadb-connector-odbc.new/mariadb-connector-odbc.changes
       2018-02-22 15:03:48.959043953 +0100
@@ -1,0 +2,9 @@
+Thu Feb 22 09:28:58 UTC 2018 - adam.ma...@suse.de
+
+- New upsream version 3.0.3
+  * fixes core dump when procedure returned more than 1 result set
+  * result SQLStatistics were ordered using the wrong columns.
+  * fetch would fail if an unbound column contained NULL
+- libreoffice_fixes.patch: upstreamed
+
+-------------------------------------------------------------------

Old:
----
  libreoffice_fixes.patch
  mariadb-connector-odbc-3.0.2-ga-src.tar.gz
  mariadb-connector-odbc-3.0.2-ga-src.tar.gz.asc

New:
----
  mariadb-connector-odbc-3.0.3-ga-src.tar.gz
  mariadb-connector-odbc-3.0.3-ga-src.tar.gz.asc

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

Other differences:
------------------
++++++ mariadb-connector-odbc.spec ++++++
--- /var/tmp/diff_new_pack.FTIRHf/_old  2018-02-22 15:03:50.310994916 +0100
+++ /var/tmp/diff_new_pack.FTIRHf/_new  2018-02-22 15:03:50.314994771 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           mariadb-connector-odbc
-Version:        3.0.2
+Version:        3.0.3
 Release:        0
 Summary:        MariaDB ODBC Connector
 License:        LGPL-2.1+
@@ -29,7 +29,6 @@
 Source2:        README
 Source3:        sample_odbc.ini
 Source4:        mariadb-connector-odbc-rpmlintrc
-Patch1:         libreoffice_fixes.patch
 Patch3:         missing_includes.patch
 Patch5:         package_name.patch
 Patch6:         DSN_names.patch
@@ -49,7 +48,6 @@
 
 %prep
 %setup -q -n mariadb-connector-odbc-%{version}-ga-src
-%patch1 -p1
 %patch3 -p1
 %patch5 -p1
 %patch6 -p1

++++++ mariadb-connector-odbc-3.0.2-ga-src.tar.gz -> 
mariadb-connector-odbc-3.0.3-ga-src.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/.idea/vcs.xml 
new/mariadb-connector-odbc-3.0.3-ga-src/.idea/vcs.xml
--- old/mariadb-connector-odbc-3.0.2-ga-src/.idea/vcs.xml       1970-01-01 
01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.idea/vcs.xml       2018-02-06 
23:04:00.000000000 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/docker-compose.yml 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/docker-compose.yml
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/docker-compose.yml  
1970-01-01 01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/docker-compose.yml  
2018-02-06 23:04:00.000000000 +0100
@@ -0,0 +1,13 @@
+version: '2'
+services:
+  db:
+    image: $DB
+    command: --character-set-server=utf8mb4 
--collation-server=utf8mb4_unicode_ci --ssl-ca=/etc/sslcert/ca.crt 
--ssl-cert=/etc/sslcert/server.crt --ssl-key=/etc/sslcert/server.key 
--bind-address=0.0.0.0
+    ports:
+      - 3305:3306
+    volumes:
+      - $SSLCERT:/etc/sslcert
+      - $ENTRYPOINT:/docker-entrypoint-initdb.d
+    environment:
+      MYSQL_DATABASE: odbc_test
+      MYSQL_ALLOW_EMPTY_PASSWORD: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/gen-ssl.sh 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/gen-ssl.sh
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/gen-ssl.sh  1970-01-01 
01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/gen-ssl.sh  2018-02-06 
23:04:00.000000000 +0100
@@ -0,0 +1,134 @@
+#!/bin/bash
+set -e
+
+log () {
+  echo "$@" 1>&2
+}
+
+print_error () {
+  echo "$@" 1>&2
+  exit 1
+}
+
+print_usage () {
+  print_error "Usage: gen-ssl-cert-key <fqdn> <output-dir>"
+}
+
+gen_cert_subject () {
+  local fqdn="$1"
+  [[ "${fqdn}" != "" ]] || print_error "FQDN cannot be blank"
+  echo 
"/C=/ST=/O=/localityName=/CN=${fqdn}/organizationalUnitName=/emailAddress=/"
+}
+
+main () {
+  local fqdn="$1"
+  local sslDir="$2"
+  [[ "${fqdn}" != "" ]] || print_usage
+  [[ -d "${sslDir}" ]] || print_error "Directory does not exist: ${sslDir}"
+
+  local caCertFile="${sslDir}/ca.crt"
+  local caKeyFile="${sslDir}/ca.key"
+  local certFile="${sslDir}/server.crt"
+  local keyFile="${sslDir}/server.key"
+  local csrFile=$(mktemp)
+  local clientCertFile="${sslDir}/client.crt"
+  local clientKeyFile="${sslDir}/client.key"
+  local clientKeystoreFile="${sslDir}/client-keystore.jks"
+  local fullClientKeystoreFile="${sslDir}/fullclient-keystore.jks"
+  local tmpKeystoreFile=$(mktemp)
+  local pcks12FullKeystoreFile="${sslDir}/fullclient-keystore.p12"
+  local clientReqFile=$(mktemp)
+
+  log "Generating CA key"
+  openssl genrsa -out "${caKeyFile}" 2048
+
+  log "Generating CA certificate"
+  openssl req \
+    -sha1 \
+    -new \
+    -x509 \
+    -nodes \
+    -days 3650 \
+    -subj "$(gen_cert_subject ca.example.com)" \
+    -key "${caKeyFile}" \
+    -out "${caCertFile}"
+
+  log "Generating private key"
+  openssl genrsa -out "${keyFile}" 2048
+
+  log "Generating certificate signing request"
+  openssl req \
+    -new \
+    -batch \
+    -sha1 \
+    -subj "$(gen_cert_subject "$fqdn")" \
+    -set_serial 01 \
+    -key "${keyFile}" \
+    -out "${csrFile}" \
+    -nodes
+
+  log "Generating X509 certificate"
+  openssl x509 \
+    -req \
+    -sha1 \
+    -set_serial 01 \
+    -CA "${caCertFile}" \
+    -CAkey "${caKeyFile}" \
+    -days 3650 \
+    -in "${csrFile}" \
+    -signkey "${keyFile}" \
+    -out "${certFile}"
+
+  log "Generating client certificate"
+  openssl req \
+    -batch \
+    -newkey rsa:2048 \
+    -days 3600 \
+    -subj "$(gen_cert_subject "$fqdn")" \
+    -nodes \
+    -keyout "${clientKeyFile}" \
+    -out "${clientReqFile}"
+
+  openssl x509 \
+    -req \
+    -in "${clientReqFile}" \
+    -days 3600 \
+    -CA "${caCertFile}" \
+    -CAkey "${caKeyFile}" \
+    -set_serial 01 \
+    -out "${clientCertFile}"
+
+  # Now generate a keystore with the client cert & key
+  log "Generating client keystore"
+  openssl pkcs12 \
+    -export \
+    -in "${clientCertFile}" \
+    -inkey "${clientKeyFile}" \
+    -out "${tmpKeystoreFile}" \
+    -name "mysqlAlias" \
+    -passout pass:kspass
+
+
+  # Now generate a full keystore with the client cert & key + trust 
certificates
+  log "Generating full client keystore"
+  openssl pkcs12 \
+    -export \
+    -in "${clientCertFile}" \
+    -inkey "${clientKeyFile}" \
+    -out "${pcks12FullKeystoreFile}" \
+    -name "mysqlAlias" \
+    -passout pass:kspass
+
+
+
+  # Clean up CSR file:
+  rm "$csrFile"
+  rm "$clientReqFile"
+  rm "$tmpKeystoreFile"
+
+  log "Generated key file and certificate in: ${sslDir}"
+  ls -l "${sslDir}"
+}
+
+main "$@"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/Dockerfile 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/Dockerfile
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/Dockerfile 
1970-01-01 01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/Dockerfile 
2018-02-06 23:04:00.000000000 +0100
@@ -0,0 +1,24 @@
+FROM centos:7
+
+ARG MAXSCALE_VERSION
+ENV MAXSCALE_VERSION ${MAXSCALE_VERSION:-2.1.4}
+
+COPY maxscale/mariadb.repo /etc/yum.repos.d/
+
+RUN rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB \
+    && yum -y install 
https://downloads.mariadb.com/MaxScale/${MAXSCALE_VERSION}/centos/7/x86_64/maxscale-${MAXSCALE_VERSION}-1.centos.7.x86_64.rpm
 \
+    && yum -y update
+
+RUN yum -y install maxscale-${MAXSCALE_VERSION} MariaDB-client \
+    && yum clean all \
+    && rm -rf /tmp/*
+
+COPY maxscale/docker-entrypoint.sh /
+RUN chmod 777 /etc/maxscale.cnf
+COPY maxscale/maxscale.cnf /etc/
+RUN chmod 777 /docker-entrypoint.sh
+
+
+EXPOSE 4006 4007 4008
+
+ENTRYPOINT ["/docker-entrypoint.sh"]
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/docker-entrypoint.sh 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/docker-entrypoint.sh
--- 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/docker-entrypoint.sh   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/docker-entrypoint.sh   
    2018-02-06 23:04:00.000000000 +0100
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+set -e
+
+echo 'creating configuration done'
+
+sleep 15
+
+#################################################################################################
+# wait for db availability for 60s
+#################################################################################################
+mysql=( mysql --protocol=tcp -ubob -hdb --port=3306 )
+for i in {60..0}; do
+    if echo 'use test2' | "${mysql[@]}" &> /dev/null; then
+        break
+    fi
+    echo 'DB init process in progress...'
+    sleep 1
+done
+
+echo 'use test2' | "${mysql[@]}"
+if [ "$i" = 0 ]; then
+    echo 'DB init process failed.'
+    exit 1
+fi
+
+echo 'maxscale launching ...'
+
+tail -n 500 /etc/maxscale.cnf
+
+/usr/bin/maxscale --nodaemon
+
+cd /var/log/maxscale
+ls -lrt
+tail -n 500 /var/log/maxscale/maxscale.log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/mariadb.repo 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/mariadb.repo
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/mariadb.repo       
1970-01-01 01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/mariadb.repo       
2018-02-06 23:04:00.000000000 +0100
@@ -0,0 +1,7 @@
+# MariaDB 10.2 CentOS repository list - created 2017-06-05 08:06 UTC
+# http://downloads.mariadb.org/mariadb/repositories/
+[mariadb]
+name = MariaDB
+baseurl = http://yum.mariadb.org/10.2/centos7-amd64
+gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
+gpgcheck=1
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/maxscale.cnf 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/maxscale.cnf
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale/maxscale.cnf       
1970-01-01 01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale/maxscale.cnf       
2018-02-06 23:04:00.000000000 +0100
@@ -0,0 +1,125 @@
+# MaxScale documentation on GitHub:
+# 
https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Documentation-Contents.md
+
+# Global parameters
+#
+# Complete list of configuration options:
+# 
https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Getting-Started/Configuration-Guide.md
+
+
+[maxscale]
+threads=2
+log_messages=1
+log_trace=1
+log_debug=1
+
+# Server definitions
+#
+# Set the address of the server to the network
+# address of a MySQL server.
+#
+
+[server1]
+type=server
+address=db
+port=3306
+protocol=MySQLBackend
+authenticator_options=skip_authentication=true
+router_options=master
+
+# Monitor for the servers
+#
+# This will keep MaxScale aware of the state of the servers.
+# MySQL Monitor documentation:
+# 
https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Monitors/MySQL-Monitor.md
+
+[MySQL Monitor]
+type=monitor
+module=mysqlmon
+servers=server1
+user=boby
+passwd=hey
+monitor_interval=10000
+
+# Service definitions
+#
+# Service Definition for a read-only service and
+# a read/write splitting service.
+#
+
+# ReadConnRoute documentation:
+# 
https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Routers/ReadConnRoute.md
+
+[Read-Only Service]
+enable_root_user=1
+version_string=10.2.99-MariaDB-maxScale
+type=service
+router=readconnroute
+servers=server1
+user=boby
+passwd=hey
+router_options=slave
+localhost_match_wildcard_host=1
+
+[Read-Write Service]
+enable_root_user=1
+version_string=10.2.99-MariaDB-maxScale
+type=service
+router=readwritesplit
+servers=server1
+user=boby
+passwd=hey
+localhost_match_wildcard_host=1
+
+[Write Service]
+type=service
+router=readconnroute
+servers=server1
+user=boby
+passwd=hey
+router_options=master
+localhost_match_wildcard_host=1
+version_string=10.2.99-MariaDB-maxscale
+
+
+# This service enables the use of the MaxAdmin interface
+# MaxScale administration guide:
+# 
https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Reference/MaxAdmin.mda
+
+[MaxAdmin Service]
+enable_root_user=1
+version_string=10.2.99-MariaDB-maxScale
+type=service
+router=cli
+
+# Listener definitions for the services
+#
+# These listeners represent the ports the
+# services will listen on.
+#
+[Write Listener]
+type=listener
+service=Write Service
+protocol=MySQLClient
+port=4007
+socket=/var/lib/maxscale/writeconn.sock
+
+[Read-Only Listener]
+type=listener
+service=Read-Only Service
+protocol=MySQLClient
+port=4008
+socket=/var/lib/maxscale/readconn.sock
+
+[Read-Write Listener]
+type=listener
+service=Read-Write Service
+protocol=MySQLClient
+port=4006
+socket=/var/lib/maxscale/rwsplit.sock
+
+[MaxAdmin Listener]
+type=listener
+service=MaxAdmin Service
+protocol=maxscaled
+socket=/tmp/maxadmin.sock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale-compose.yml 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale-compose.yml
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/maxscale-compose.yml        
1970-01-01 01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/maxscale-compose.yml        
2018-02-06 23:04:00.000000000 +0100
@@ -0,0 +1,25 @@
+version: '2'
+services:
+  maxscale:
+    depends_on:
+      - db
+    ports:
+      - 4006:4006
+      - 4007:4007
+      - 4008:4008
+    build:
+      context: .
+      dockerfile: maxscale/Dockerfile
+      args:
+        MAXSCALE_VERSION: $MAXSCALE_VERSION
+  db:
+    image: $DB
+    command: --character-set-server=utf8mb4 
--collation-server=utf8mb4_unicode_ci --ssl-ca=/etc/sslcert/ca.crt 
--ssl-cert=/etc/sslcert/server.crt --ssl-key=/etc/sslcert/server.key 
--bind-address=0.0.0.0
+    ports:
+      - 3305:3306
+    volumes:
+      - $SSLCERT:/etc/sslcert
+      - $ENTRYPOINT:/docker-entrypoint-initdb.d
+    environment:
+      MYSQL_DATABASE: odbc_test
+      MYSQL_ALLOW_EMPTY_PASSWORD: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/script.sh 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/script.sh
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/script.sh   1970-01-01 
01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/script.sh   2018-02-06 
23:04:00.000000000 +0100
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+set -x
+set -e
+
+###################################################################################################################
+# test different type of configuration
+###################################################################################################################
+mysql=( mysql --protocol=tcp -ubob -h127.0.0.1 --port=3305 )
+export COMPOSE_FILE=.travis/docker-compose.yml
+
+
+if [ -n "$MAXSCALE_VERSION" ]
+then
+  mysql=( mysql --protocol=tcp -ubob -h127.0.0.1 --port=4007 )
+  export COMPOSE_FILE=.travis/maxscale-compose.yml
+  export TEST_PORT=4007
+else
+  export TEST_PORT=3305
+fi
+
+
+###################################################################################################################
+# launch docker server and maxscale
+###################################################################################################################
+export INNODB_LOG_FILE_SIZE=$(echo ${PACKET}| cut -d'M' -f 1)0M
+docker-compose -f ${COMPOSE_FILE} build
+docker-compose -f ${COMPOSE_FILE} up -d
+
+
+###################################################################################################################
+# wait for docker initialisation
+###################################################################################################################
+
+for i in {60..0}; do
+    if echo 'SELECT 1' | "${mysql[@]}" &> /dev/null; then
+        break
+    fi
+    echo 'data server still not active'
+    sleep 1
+done
+
+docker-compose -f ${COMPOSE_FILE} logs
+
+if [ "$i" = 0 ]; then
+    echo 'SELECT 1' | "${mysql[@]}"
+    echo >&2 'data server init process failed.'
+    exit 1
+fi
+
+#list ssl certificates
+ls -lrt ${SSLCERT}
+
+
+#build C connector
+DEBIAN_FRONTEND=noninteractive sudo apt-get install --allow-unauthenticated -y 
--force-yes -m unixodbc-dev
+#mkdir ./connector_c
+time git clone -b master --depth 1 
"https://github.com/MariaDB/mariadb-connector-c.git"; build
+cd build
+#git fetch --all --tags --prune
+#git checkout tags/${CONNECTOR_C_VERSION} -b odbc_travis_build
+
+cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo  -DWITH_OPENSSL=ON
+#-DCMAKE_INSTALL_PREFIX= ../connector_c .
+make
+sudo make install
+cd ..
+rm build -rf
+
+#build odbc connector
+export TEST_DRIVER=maodbc_test
+export TEST_DSN=maodbc_test
+export TEST_SERVER=mariadb.example.com
+export TEST_SOCKET=
+export TEST_SCHEMA=odbc_test
+export TEST_UID=bob
+export TEST_PASSWORD= 
+
+cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_OPENSSL=ON 
-DMARIADB_DIR=./connector_c .
+cmake --build . --config RelWithDebInfo 
+
+###################################################################################################################
+# run test suite
+###################################################################################################################
+echo "Running tests"
+
+cd test
+export ODBCINI="$PWD/odbc.ini"
+export ODBCSYSINI=$PWD
+
+
+ctest -V
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/.travis/sql/dbinit.sql 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis/sql/dbinit.sql
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis/sql/dbinit.sql      
1970-01-01 01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis/sql/dbinit.sql      
2018-02-06 23:04:00.000000000 +0100
@@ -0,0 +1,9 @@
+CREATE USER 'bob'@'%';
+GRANT ALL ON *.* TO 'bob'@'%' with grant option;
+
+CREATE USER 'boby'@'%' identified by 'hey';
+GRANT ALL ON *.* TO 'boby'@'%' with grant option;
+
+FLUSH PRIVILEGES;
+
+CREATE DATABASE test2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/.travis.yml 
new/mariadb-connector-odbc-3.0.3-ga-src/.travis.yml
--- old/mariadb-connector-odbc-3.0.2-ga-src/.travis.yml 1970-01-01 
01:00:00.000000000 +0100
+++ new/mariadb-connector-odbc-3.0.3-ga-src/.travis.yml 2018-02-06 
23:04:00.000000000 +0100
@@ -0,0 +1,29 @@
+sudo: true
+language: c
+services: docker
+addons:
+  hosts:
+    - mariadb.example.com
+
+before_install:
+  - chmod +x .travis/script.sh
+  - chmod +x .travis/gen-ssl.sh
+  - export PROJ_PATH=`pwd`
+  - export ENTRYPOINT=$PROJ_PATH/.travis/sql
+  - mkdir tmp
+  - .travis/gen-ssl.sh mariadb.example.com tmp
+  - export SSLCERT=$PROJ_PATH/tmp
+  - export CONNECTOR_C_VERSION=v_2.3.3
+
+env:
+  #- DB=mysql:5.5
+  #- DB=mysql:5.6
+  #- DB=mysql:5.7
+  - DB=mariadb:5.5
+  - DB=mariadb:10.0
+  - DB=mariadb:10.1
+  - DB=mariadb:10.2
+  - DB=mariadb:10.3
+  #- DB=mariadb:10.2 PACKET=8M MAXSCALE_VERSION=2.1.8
+
+script: .travis/script.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/CMakeLists.txt 
new/mariadb-connector-odbc-3.0.3-ga-src/CMakeLists.txt
--- old/mariadb-connector-odbc-3.0.2-ga-src/CMakeLists.txt      2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/CMakeLists.txt      2018-02-06 
23:04:00.000000000 +0100
@@ -22,10 +22,10 @@
 
 SET(MARIADB_ODBC_VERSION_MAJOR 3)
 SET(MARIADB_ODBC_VERSION_MINOR 0)
-SET(MARIADB_ODBC_VERSION_PATCH 2)
+SET(MARIADB_ODBC_VERSION_PATCH 3)
 SET(MARIADB_ODBC_VERSION_QUALITY "ga")
 
-SET(MARIADB_ODBC_VERSION "03.00.0002")
+SET(MARIADB_ODBC_VERSION "03.00.0003")
 
 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/ma_odbc_version.h.in
                ${CMAKE_SOURCE_DIR}/ma_odbc_version.h)
@@ -101,7 +101,7 @@
   SET(PLATFORM_DEPENDENCIES ws2_32 Shlwapi)
   IF (MSVC)
     MESSAGE(STATUS "MSVC_VERSION= ${MSVC_VERSION}") 
-    IF (MSVC_VERSION EQUAL 1900)
+    IF (NOT(MSVC_VERSION LESS 1900))
       MESSAGE(STATUS "Configuring to link connector against 
legacy_stdio_definitions") 
       SET(PLATFORM_DEPENDENCIES ${PLATFORM_DEPENDENCIES} 
legacy_stdio_definitions)
     ENDIF()
@@ -228,6 +228,7 @@
     ENDIF()
   ELSE()
     MESSAGE(STATUS "Configuring SSL support using SChannel")
+    SET(PLATFORM_DEPENDENCIES ${PLATFORM_DEPENDENCIES} version.lib)
   ENDIF()
 ELSE()
   MESSAGE(STATUS "Configuring to build without SSL support")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/cmake/FindDM.cmake 
new/mariadb-connector-odbc-3.0.3-ga-src/cmake/FindDM.cmake
--- old/mariadb-connector-odbc-3.0.2-ga-src/cmake/FindDM.cmake  2016-06-08 
15:27:41.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/cmake/FindDM.cmake  2018-02-06 
23:04:00.000000000 +0100
@@ -82,9 +82,20 @@
       DOC "Driver Manager Libraries")
   FIND_PATH(ODBC_LIB_DIR libodbc.so
       DOC "Driver Manager Libraries")
+  FIND_PATH(ODBCINST_LIB_DIR libodbcinst.so
+      HINTS ${DM_LIB_DIR}
+            ${DM_DIR}
+            ENV DM_LIB_DIR
+            ENV DM_DIR
+      PATHS ${LIB_PATHS}
+      PATH_SUFFIXES ${LIB_SUFFIX} 
+      NO_DEFAULT_PATH
+      DOC "Driver Manager Libraries")
+  FIND_PATH(ODBCINST_LIB_DIR libodbcinst.so
+      DOC "Driver Manager Libraries")
 ENDIF()
 
 IF(ODBC_LIB_DIR AND ODBC_INCLUDE_DIR)
-  MESSAGE(STATUS "Found ODBC Driver Manager libraries: ${ODBC_LIB_DIR}")
+  MESSAGE(STATUS "Found ODBC Driver Manager libraries: ${ODBC_LIB_DIR} 
${ODBC_LIB_DIR}")
   SET(DM_FOUND TRUE)
 ENDIF()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_bulk.c 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_bulk.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_bulk.c   2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_bulk.c   2018-02-06 
23:04:00.000000000 +0100
@@ -170,7 +170,7 @@
 
     if (VariableLengthMadbType)
     {
-      MaBind->length[row]= MADB_CalculateLength(Stmt, OctetLengthPtr != NULL ? 
&OctetLengthPtr[row] : NULL, CRec, DataPtr);
+      MaBind->length[row]= (unsigned long)MADB_CalculateLength(Stmt, 
OctetLengthPtr != NULL ? &OctetLengthPtr[row] : NULL, CRec, DataPtr);
     }
   }
 
@@ -322,7 +322,7 @@
         {
           if (Stmt->Apd->Header.ArrayStatusPtr[row] == SQL_PARAM_IGNORE)
           {
-            MADB_SetIndicatorValue(Stmt, &Stmt->params[IndIdx], row, 
SQL_PARAM_IGNORE);
+            MADB_SetIndicatorValue(Stmt, &Stmt->params[IndIdx], (unsigned 
int)row, SQL_PARAM_IGNORE);
           }
         }       
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_connection.c 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_connection.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_connection.c     2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_connection.c     2018-02-06 
23:04:00.000000000 +0100
@@ -887,7 +887,7 @@
     MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, 0, StringLengthPtr);
     break;
   case SQL_CATALOG_LOCATION:
-    MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, SQL_CL_START, StringLengthPtr);
+    MADB_SET_NUM_VAL(SQLUSMALLINT, InfoValuePtr, SQL_CL_START, 
StringLengthPtr);
     break;
   case SQL_CATALOG_NAME:
     /* Todo: MyODBC Driver has a DSN configuration for diabling catalog usage:
@@ -1212,7 +1212,7 @@
     break;
   }
   case SQL_GROUP_BY:
-    MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, SQL_GB_NO_RELATION, 
StringLengthPtr);
+    MADB_SET_NUM_VAL(SQLUSMALLINT, InfoValuePtr, SQL_GB_NO_RELATION, 
StringLengthPtr);
     break;
   case SQL_IDENTIFIER_CASE:
     MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, SQL_IC_MIXED, StringLengthPtr);
@@ -1333,7 +1333,7 @@
     {
       size_t max_packet_size;
       mariadb_get_infov(Dbc->mariadb, MARIADB_MAX_ALLOWED_PACKET, 
&max_packet_size);
-      MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, max_packet_size, 
StringLengthPtr);
+      MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, 
(SQLUINTEGER)max_packet_size, StringLengthPtr);
     }
     break;
   case SQL_MAX_TABLE_NAME_LEN:
@@ -1612,9 +1612,13 @@
     return Dbc->Error.ReturnValue;
   }
   if (isWChar && SLen)
+  {
     SLen*= sizeof(SQLWCHAR);
-  if (StringLengthPtr && SLen)
+  }
+  if (IsString_GetInfo_Type(InfoType) && StringLengthPtr)
+  {
     *StringLengthPtr= SLen;
+  }
   
   return SQL_SUCCESS;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_desc.c 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_desc.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_desc.c   2017-08-01 
14:24:14.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_desc.c   2018-02-06 
23:04:00.000000000 +0100
@@ -738,7 +738,7 @@
     *((SQLPOINTER *)ValuePtr)= (SQLPOINTER)Desc->Header.BindOffsetPtr;
     break;
   case SQL_DESC_BIND_TYPE:
-    *((SQLINTEGER *)ValuePtr)= Desc->Header.BindType;
+    *((SQLULEN *)ValuePtr)= Desc->Header.BindType;
     break;
   case SQL_DESC_COUNT:
     *(SQLSMALLINT *)ValuePtr= Desc->Header.Count;
@@ -975,7 +975,9 @@
       break;
     }
   
-    if (DescRecord)
+    /* inUse is only used to check if column/parameter was bound or not. Thus 
we do not set it for each field, but only for those,
+       that make column/parameter "bound" */
+    if (DescRecord && (DescRecord->DataPtr != NULL || 
DescRecord->OctetLengthPtr != NULL || DescRecord->IndicatorPtr != NULL))
       DescRecord->inUse= 1;
   }
   return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_dsn.h 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_dsn.h
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_dsn.h    2017-08-01 
14:24:07.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_dsn.h    2018-02-06 
23:04:00.000000000 +0100
@@ -16,7 +16,7 @@
    or write to the Free Software Foundation, Inc., 
    51 Franklin St., Fifth Floor, Boston, MA 02110, USA
 
*************************************************************************************/
-#ifndef _na_dsn_h_
+#ifndef _ma_dsn_h_
 #define _ma_dsn_h_
 
 #include <odbcinst.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_helper.c 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_helper.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_helper.c 2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_helper.c 2018-02-06 
23:04:00.000000000 +0100
@@ -1045,7 +1045,7 @@
       
       memcpy(digits + digits_count, dot + 1, digits_significant);
       digits_count+= digits_significant;
-
+      number->scale= (SQLSCHAR)digits_significant;
     } else 
     {
       char *start= p;
@@ -1292,3 +1292,18 @@
   return FALSE;
 }
 
+
+void MADB_InstallStmt(MADB_Stmt *Stmt)
+{
+  Stmt->stmt= Stmt->MultiStmts[Stmt->MultiStmtNr];
+
+  if (mysql_stmt_field_count(Stmt->stmt) == 0)
+  {
+    Stmt->AffectedRows= mysql_stmt_affected_rows(Stmt->stmt);
+  }
+  else
+  {
+    MADB_StmtResetResultStructures(Stmt);
+    MADB_DescSetIrdMetadata(Stmt, mysql_fetch_fields(FetchMetadata(Stmt)), 
mysql_stmt_field_count(Stmt->stmt));
+  }
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_helper.h 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_helper.h
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_helper.h 2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_helper.h 2018-02-06 
23:04:00.000000000 +0100
@@ -65,6 +65,9 @@
 BOOL          MADB_IsNumericType(SQLSMALLINT ConciseType);
 BOOL          MADB_IsIntType    (SQLSMALLINT ConciseType);
 
+/* For multistatement picks stmt handler pointed by stored index, and sets it 
as "current" stmt handler */
+void          MADB_InstallStmt  (MADB_Stmt *Stmt);
+
 /* for dummy binding */
 extern my_bool DummyError;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_odbc.h 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_odbc.h
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_odbc.h   2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_odbc.h   2018-02-06 
23:04:00.000000000 +0100
@@ -302,7 +302,6 @@
   MADB_List                 ListItem;
   MADB_QUERY                *Tokens;
   SQLSMALLINT               ParamCount;
-  my_bool                   isMultiQuery;
   enum MADB_DaeType         DataExecutionType;
   MYSQL_RES                 *DefaultsResult;
   int                       ArrayOffset;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mariadb-connector-odbc-3.0.2-ga-src/ma_odbc_version.h 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_odbc_version.h
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_odbc_version.h   2017-10-09 
23:17:17.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_odbc_version.h   2018-02-06 
23:06:41.000000000 +0100
@@ -7,9 +7,9 @@
 
 #define MARIADB_ODBC_VERSION_MAJOR 3
 #define MARIADB_ODBC_VERSION_MINOR 0
-#define MARIADB_ODBC_VERSION_PATCH 2
+#define MARIADB_ODBC_VERSION_PATCH 3
 
-#define MARIADB_ODBC_VERSION "03.00.0002"
+#define MARIADB_ODBC_VERSION "03.00.0003"
 
-#define MARIADB_ODBC_ERR_PREFIX "[ma-3.0.2]"
+#define MARIADB_ODBC_ERR_PREFIX "[ma-3.0.3]"
 #endif /* _ma_odbc_version_h_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_result.c 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_result.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_result.c 2017-08-01 
14:24:14.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_result.c 2018-02-06 
23:04:00.000000000 +0100
@@ -1,5 +1,5 @@
 
/************************************************************************************
-   Copyright (C) 2013 SkySQL AB
+   Copyright (C) 2013,2018 MariaDB Corporation AB
    
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -18,6 +18,21 @@
 
*************************************************************************************/
  #include <ma_odbc.h>
 
+
+/* {{{ MADB_StmtResetResultStructures */
+void MADB_StmtResetResultStructures(MADB_Stmt *Stmt)
+{
+  Stmt->CharOffset= (unsigned long *)MADB_REALLOC((char *)Stmt->CharOffset,
+    sizeof(long) * mysql_stmt_field_count(Stmt->stmt));
+  memset(Stmt->CharOffset, 0, sizeof(long) * 
mysql_stmt_field_count(Stmt->stmt));
+  Stmt->Lengths= (unsigned long *)MADB_REALLOC((char *)Stmt->Lengths,
+    sizeof(long) * mysql_stmt_field_count(Stmt->stmt));
+  memset(Stmt->Lengths, 0, sizeof(long) * mysql_stmt_field_count(Stmt->stmt));
+
+  MADB_STMT_RESET_CURSOR(Stmt);
+}
+/* }}} */
+
 /* {{{ MADB_StmtDataSeek */
 SQLRETURN MADB_StmtDataSeek(MADB_Stmt *Stmt, my_ulonglong FetchOffset)
 {
@@ -46,11 +61,14 @@
   if (Stmt->MultiStmts)
   {
     if (Stmt->MultiStmtNr == Stmt->MultiStmtCount - 1)
+    {
       return SQL_NO_DATA;
+    }
+
+    ++Stmt->MultiStmtNr;
+
+    MADB_InstallStmt(Stmt);
 
-    Stmt->MultiStmtNr++;
-    Stmt->stmt= Stmt->MultiStmts[Stmt->MultiStmtNr];
-    Stmt->AffectedRows= mysql_stmt_affected_rows(Stmt->stmt);
     return SQL_SUCCESS;
   }
 
@@ -81,7 +99,7 @@
     return SQL_NO_DATA;
   }
 
-  MADB_STMT_RESET_CURSOR(Stmt);
+  MADB_StmtResetResultStructures(Stmt);
 
   MADB_DescSetIrdMetadata(Stmt, mysql_fetch_fields(FetchMetadata(Stmt)), 
mysql_stmt_field_count(Stmt->stmt));
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_result.h 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_result.h
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_result.h 2017-08-01 
14:24:07.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_result.h 2018-02-06 
23:04:00.000000000 +0100
@@ -1,5 +1,5 @@
 
/************************************************************************************
-   Copyright (C) 2013 SkySQL AB
+   Copyright (C) 2013,2018 MariaDB Corporation AB
    
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -19,6 +19,7 @@
  #ifndef _ma_result_h_
  #define _ma_result_h_
 
+void MADB_StmtResetResultStructures(MADB_Stmt *Stmt);
 SQLRETURN MADB_StmtDataSeek   (MADB_Stmt *Stmt, my_ulonglong FetchOffset);
 SQLRETURN MADB_StmtMoreResults(MADB_Stmt *Stmt);
 SQLULEN   MADB_RowsToFetch(MADB_Cursor *Cursor, SQLULEN ArraySize, unsigned 
long long RowsInResultst);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_statement.c 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_statement.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_statement.c      2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_statement.c      2018-02-06 
23:04:00.000000000 +0100
@@ -459,7 +459,7 @@
 {
   LOCK_MARIADB(Stmt->Connection);
   MDBUG_C_PRINT(Stmt->Connection, "mysql_stmt_prepare(%0x,%s)", Stmt->stmt, 
Stmt->StmtString);
-  if (mysql_stmt_prepare(Stmt->stmt, Stmt->StmtString, 
strlen(Stmt->StmtString)))
+  if (mysql_stmt_prepare(Stmt->stmt, Stmt->StmtString, (unsigned 
long)strlen(Stmt->StmtString)))
   {
     /* Need to save error first */
     MADB_SetNativeError(&Stmt->Error, SQL_HANDLE_STMT, Stmt->stmt);
@@ -998,7 +998,7 @@
   unsigned int ParamOffset=   0; /* for multi statements */
   unsigned int Iterations=    1,
     /* Will use it for STMT_ATTR_ARRAY_SIZE and as indicator if we are 
deploying MariaDB bulk insert feature */
-    MariadbArrSize= MADB_BulkInsertPossible(Stmt) != FALSE ? 
Stmt->Apd->Header.ArraySize : 0;
+    MariadbArrSize= MADB_BulkInsertPossible(Stmt) != FALSE ? (unsigned 
int)Stmt->Apd->Header.ArraySize : 0;
   SQLULEN      j, Start=      0;
 
   MDBUG_C_PRINT(Stmt->Connection, "%sMADB_StmtExecute", "\t->");
@@ -1056,7 +1056,7 @@
     Stmt->Bulk.HasRowsToSkip= 0;
   }
 
-  for (StatementNr=0; StatementNr < Iterations; StatementNr++)
+  for (StatementNr= 0; StatementNr < Iterations; ++StatementNr)
   {
     if (Stmt->MultiStmts)
     {
@@ -1077,7 +1077,7 @@
       {
         /* Doing just the same thing as we would do in general case */
         MADB_CleanBulkOperData(Stmt, ParamOffset);
-        ErrorCount= Stmt->Apd->Header.ArraySize;
+        ErrorCount= (unsigned int)Stmt->Apd->Header.ArraySize;
         MADB_SetStatusArray(Stmt, SQL_PARAM_DIAG_UNAVAILABLE);
         goto end;
       }
@@ -1087,7 +1087,7 @@
       }
       /* Suboptimal, but more reliable and simple */
       MADB_CleanBulkOperData(Stmt, ParamOffset);
-      Stmt->ArrayOffset+= Stmt->Apd->Header.ArraySize;
+      Stmt->ArrayOffset+= (int)Stmt->Apd->Header.ArraySize;
       if (Stmt->Ipd->Header.RowsProcessedPtr)
       {
         *Stmt->Ipd->Header.RowsProcessedPtr= 
*Stmt->Ipd->Header.RowsProcessedPtr + Stmt->Apd->Header.ArraySize;
@@ -1195,20 +1195,14 @@
   /* All rows processed, so we can unset ArrayOffset */
   Stmt->ArrayOffset= 0;
 
-  if (Stmt->MultiStmts && !mysql_stmt_field_count(Stmt->stmt))
+  if (Stmt->MultiStmts)
   {
-    Stmt->AffectedRows= mysql_stmt_affected_rows(Stmt->stmt);
     Stmt->MultiStmtNr= 0;
+    MADB_InstallStmt(Stmt);
   }
-
-  if (!Stmt->MultiStmts && mysql_stmt_field_count(Stmt->stmt) > 0)
+  else if (mysql_stmt_field_count(Stmt->stmt) > 0)
   {
-    Stmt->CharOffset= (unsigned long *)MADB_REALLOC((char *)Stmt->CharOffset, 
-                                                    sizeof(long) * 
mysql_stmt_field_count(Stmt->stmt));
-    memset(Stmt->CharOffset, 0, sizeof(long) * 
mysql_stmt_field_count(Stmt->stmt));
-    Stmt->Lengths= (unsigned long *)MADB_REALLOC((char *)Stmt->Lengths,
-                                                   sizeof(long) * 
mysql_stmt_field_count(Stmt->stmt));
-    memset(Stmt->Lengths, 0, sizeof(long) * 
mysql_stmt_field_count(Stmt->stmt));
+    MADB_StmtResetResultStructures(Stmt);
 
     /* Todo: for SQL_CURSOR_FORWARD_ONLY we should use cursor and prefetch 
rows */
     /*************************** mysql_stmt_store_result 
******************************/
@@ -1223,8 +1217,6 @@
 
       return MADB_SetNativeError(&Stmt->Error, SQL_HANDLE_STMT, Stmt->stmt);
     }
-
-    MADB_STMT_RESET_CURSOR(Stmt);
     
     /* I don't think we can reliably establish the fact that we do not need to 
re-fetch the metadata, thus we are re-fetching always
        The fact that we have resultset has been established above in "if" 
condition(fields count is > 0) */
@@ -1851,7 +1843,7 @@
     return MADB_SetError(&Stmt->Error, MADB_ERR_24000, NULL, 0);
   }
 
-  if ((Stmt->Options.UseBookmarks == SQL_UB_VARIABLE && 
Stmt->Options.BookmarkType != SQL_C_VARBOOKMARK) ||
+  if ((Stmt->Options.UseBookmarks == SQL_UB_VARIABLE && 
Stmt->Options.BookmarkType == SQL_C_BOOKMARK) ||
       (Stmt->Options.UseBookmarks != SQL_UB_VARIABLE && 
Stmt->Options.BookmarkType == SQL_C_VARBOOKMARK))
   {
     MADB_SetError(&Stmt->Error, MADB_ERR_07006, NULL, 0);
@@ -1930,7 +1922,7 @@
     /************************ Bind! ********************************/  
     mysql_stmt_bind_result(Stmt->stmt, Stmt->result);
 
-    if (Stmt->Options.UseBookmarks)
+    if (Stmt->Options.UseBookmarks && Stmt->Options.BookmarkPtr != NULL)
     {
       /* TODO: Bookmark can be not only "unsigned long*", but also "unsigned 
char*". Can be determined by examining Stmt->Options.BookmarkType */
       long *p= (long *)Stmt->Options.BookmarkPtr;
@@ -2059,7 +2051,7 @@
     *(SQLPOINTER *)ValuePtr= Stmt->Apd->Header.BindOffsetPtr;
     break;
   case SQL_ATTR_PARAM_BIND_TYPE:
-    *(SQLINTEGER *)ValuePtr= Stmt->Apd->Header.BindType;
+    *(SQLULEN *)ValuePtr= Stmt->Apd->Header.BindType;
     break;
   case SQL_ATTR_PARAM_OPERATION_PTR:
     *(SQLPOINTER *)ValuePtr= (SQLPOINTER)Stmt->Apd->Header.ArrayStatusPtr;
@@ -2084,7 +2076,7 @@
     *(SQLPOINTER *)ValuePtr= (SQLPOINTER)Stmt->Ard->Header.BindOffsetPtr;
     break;
   case SQL_ATTR_ROW_BIND_TYPE:
-    *(SQLINTEGER *)ValuePtr= Stmt->Ard->Header.BindType;
+    *(SQLULEN *)ValuePtr= Stmt->Ard->Header.BindType;
     break;
   case SQL_ATTR_ROW_OPERATION_PTR:
     *(SQLPOINTER *)ValuePtr= (SQLPOINTER)Stmt->Ard->Header.ArrayStatusPtr;
@@ -2457,8 +2449,6 @@
          (Access uses default types on getting catalog functions results, and 
not quite happy when it gets something unexpected. Seemingly it cares about 
returned data lenghts even for types,
          for which standard says application should not care about */
       OdbcType= IrdRec->ConciseType;
-      /*OdbcType= Stmt->Connection->IsAnsi || (Col_or_Param_Num == 10 && 
BufferLength == 2) ?
-                IrdRec->ConciseType : MADB_GetWCharType(IrdRec->ConciseType);*/
     }
     break;
   default:
@@ -2667,7 +2657,7 @@
 
           if (!Stmt->CharOffset[Offset])
           {
-            Stmt->Lengths[Offset]= CharLength*sizeof(SQLWCHAR);
+            Stmt->Lengths[Offset]= (unsigned 
long)(CharLength*sizeof(SQLWCHAR));
           }
         }
       }
@@ -2703,7 +2693,7 @@
       if (CharLength >= BufferLength / sizeof(SQLWCHAR))
       {
         /* Calculate new offset and substract 1 byte for null termination */
-        Stmt->CharOffset[Offset]+= BufferLength - sizeof(SQLWCHAR);
+        Stmt->CharOffset[Offset]+= (unsigned long)BufferLength - 
sizeof(SQLWCHAR);
         MADB_FREE(ClientValue);
 
         return MADB_SetError(&Stmt->Error, MADB_ERR_01004, NULL, 0);
@@ -2785,7 +2775,9 @@
       /* Dirty temporary hack before we know what is going on. Yes, there is 
nothing more eternal, than temporary
          It's not that bad, after all */
       if ((long)*Bind.length == -1)
+      {
         *Bind.length= 0;
+      }
       /* end of dirty hack */
 
       if (!InternalUse && !Stmt->CharOffset[Offset])
@@ -2837,6 +2829,7 @@
         Bind.buffer_length= (unsigned long)BufferLength;
       }
       mysql_stmt_fetch_column(Stmt->stmt, &Bind, Offset, 0);
+
       if (StrLen_or_IndPtr != NULL)
       {
         if (Bind.length_value != 0 && (long)Bind.length_value != -1)
@@ -2847,13 +2840,22 @@
         {
           *StrLen_or_IndPtr= Bind.buffer_length;
         }
-        else/* if (TargetType == SQL_C_DEFAULT)*/
+        else
+        {
+          *StrLen_or_IndPtr= IrdRec->OctetLength;
+        }
+        /* We get here only for fixed data types. Thus this data sanity check 
makes sense. But we do this
+           for catalog functions and MS Access in first turn. The thing is 
that for some columns in catalog functions result,
+           we fix column type manually, since we can't make field of desired 
type in the query to I_S. Mostly that is for SQLSMALLINT
+           fields, and we can cast only to int, not to short. MSAccess in its 
turn like to to get lenght for fixed length types, and
+           throws error if the length is not what it expected (ODBC-131)
+           Probably it makes sense to do this only for SQL_C_DEFAULT type, 
which MS Access uses. But atm it looks like this should
+           not hurt if done for other types, too */
+        if (*StrLen_or_IndPtr > IrdRec->OctetLength)
         {
           *StrLen_or_IndPtr= IrdRec->OctetLength;
         }
       }
-      /* Bind.fetch_result(&Bind, &Stmt->stmt->fields[Offset], 
&Stmt->stmt->bind[Offset].row_ptr); */
-      //Stmt->stmt->bind[Offset].row_ptr= SavePtr;
     }
   }             /* End of switch(OdbcType) */
 
@@ -3349,7 +3351,7 @@
   if (Unique == SQL_INDEX_UNIQUE)
     p+= _snprintf(p, 1023 - strlen(StmtStr), "AND NON_UNIQUE=0 ");
 
-  _snprintf(p, 1023 - strlen(StmtStr), "ORDER BY TABLE_SCHEM, TABLE_NAME");
+  _snprintf(p, 1023 - strlen(StmtStr), "ORDER BY NON_UNIQUE, INDEX_NAME, 
ORDINAL_POSITION");
 
 
   ret= Stmt->Methods->ExecDirect(Stmt, StmtStr, SQL_NTS);
@@ -3916,15 +3918,23 @@
   Stmt->LastRowFetched= LastRowFetched;
   Stmt->AffectedRows=   AffectedRows;
 
-  MADB_StmtDataSeek(Stmt, Stmt->Cursor.Position);
-  if (SQL_SUCCEEDED(ret))
+  if (Stmt->Cursor.Position > 0)
   {
-    /* We need to prevent that bound variables will be overwritten
-       by fetching data again: For subsequent GetData we need to update
-       bind->row_ptr */
-    Stmt->Methods->RefreshRowPtrs(Stmt);
+    /* Looks likt this is not needed altogether. Leaving it commented out, so 
far */
+    /*MADB_StmtDataSeek(Stmt, Stmt->Cursor.Position);
+    if (SQL_SUCCEEDED(ret))
+    {*/
+      /* We need to prevent that bound variables will be overwritten
+          by fetching data again: For subsequent GetData we need to update
+          bind->row_ptr */
+      /*Stmt->Methods->RefreshRowPtrs(Stmt);
  
-    MADB_StmtDataSeek(Stmt, Stmt->Cursor.Position);
+      MADB_StmtDataSeek(Stmt, Stmt->Cursor.Position);
+    }*/
+  }
+  else
+  {
+    Stmt->Cursor.Position= 0;
   }
   return ret;
 }
@@ -4294,7 +4304,7 @@
 SQLRETURN MADB_StmtFetchScroll(MADB_Stmt *Stmt, SQLSMALLINT FetchOrientation,
                                SQLLEN FetchOffset)
 {
-  SQLRETURN ret;
+  SQLRETURN ret= SQL_SUCCESS;
   SQLLEN    Position;
   SQLLEN    RowsProcessed;
 
@@ -4389,10 +4399,20 @@
   }
   if (Position < 0 || (my_ulonglong)Position > mysql_stmt_num_rows(Stmt->stmt) 
- 1)
   {
+    /* We need to put cursor before RS start, not only return error */
+    if (Position < 0)
+    {
+      MADB_StmtDataSeek(Stmt, 0);
+    }
     return SQL_NO_DATA;
   }
+
+  if (FetchOrientation != SQL_FETCH_NEXT || RowsProcessed > 1 || 
Stmt->Options.CursorType == SQL_CURSOR_DYNAMIC)
+  {
+    ret= MADB_StmtDataSeek(Stmt, Stmt->Cursor.Position);
+  }
   
-  ret= MADB_StmtDataSeek(Stmt, Stmt->Cursor.Position);
+  /* Assuming, that ret before previous "if" was SQL_SUCCESS */
   if (ret == SQL_SUCCESS)
   {
     ret= Stmt->Methods->Fetch(Stmt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_statement.h 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_statement.h
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_statement.h      2017-08-01 
14:24:14.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_statement.h      2018-02-06 
23:04:00.000000000 +0100
@@ -190,8 +190,8 @@
 
 /************** SQLColumns       *************/
 #define MADB_COLUMN_SIZE\
-    "CASE" \
-    "  WHEN DATA_TYPE = 'bit' THEN @ColSize:=CAST(((NUMERIC_PRECISION + 7) / 
8) AS SIGNED) "\
+    "CAST(CASE" \
+    "  WHEN DATA_TYPE = 'bit' THEN @ColSize:=((NUMERIC_PRECISION + 7) / 8) "\
     "  WHEN DATA_TYPE in ('tinyint', 'smallint', 'year', 'mediumint', 'int',"\
                          "'bigint', 'decimal', 'double') THEN 
@ColSize:=NUMERIC_PRECISION "\
     "  WHEN DATA_TYPE = 'float' THEN @ColSize:=7"\
@@ -199,7 +199,7 @@
     "  WHEN DATA_TYPE='time' THEN @ColSize:=8"\
     "  WHEN DATA_TYPE in ('timestamp', 'datetime') THEN @ColSize:=19 "\
     "  ELSE @ColSize:=CHARACTER_MAXIMUM_LENGTH "\
-  "END "
+  "END AS SIGNED)"
 
 #define MADB_CATALOG_COLUMNSp1 "SELECT TABLE_SCHEMA AS TABLE_CAT, NULL AS 
TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, "
 #define MADB_CATALOG_COLUMNSp3  ", UCASE(IF(COLUMN_TYPE LIKE '%%(%%)%%',  
CONCAT(SUBSTRING(COLUMN_TYPE,1, LOCATE('(',COLUMN_TYPE) - 1 ), 
SUBSTRING(COLUMN_TYPE,1+locate(')',COLUMN_TYPE))), COLUMN_TYPE )) AS TYPE_NAME, 
"\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/ma_typeconv.c 
new/mariadb-connector-odbc-3.0.3-ga-src/ma_typeconv.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/ma_typeconv.c       2017-08-01 
14:24:14.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/ma_typeconv.c       2018-02-06 
23:04:00.000000000 +0100
@@ -98,7 +98,7 @@
   if (Numeric->scale > 0)
   {
     char tmp[38];
-    _snprintf(tmp, 38, "%%%d.%df", Numeric->precision, Numeric->scale);
+    _snprintf(tmp, 38, "%%.%df", Numeric->scale);
     _snprintf(Buffer, 38, tmp, Numerator / pow(10, Scale));
   }
   else
@@ -578,7 +578,7 @@
     MaBind->buffer_type=   0;
     MaBind->is_unsigned=   0;
 
-    *LengthPtr= Length;
+    *LengthPtr= (unsigned long)Length;
     MaBind->buffer_type= MADB_GetMaDBTypeAndLength(CRec->ConciseType,
       &MaBind->is_unsigned, &MaBind->buffer_length);
 
Binary files old/mariadb-connector-odbc-3.0.2-ga-src/maodbca.rc and 
new/mariadb-connector-odbc-3.0.3-ga-src/maodbca.rc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/maodbcu.rc 
new/mariadb-connector-odbc-3.0.3-ga-src/maodbcu.rc
--- old/mariadb-connector-odbc-3.0.2-ga-src/maodbcu.rc  2017-10-09 
23:13:07.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/maodbcu.rc  2018-02-06 
23:02:46.000000000 +0100
@@ -50,8 +50,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,0,2,0
- PRODUCTVERSION 3,0,2,0
+ FILEVERSION 3,0,3,0
+ PRODUCTVERSION 3,0,3,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -68,12 +68,12 @@
         BEGIN
             VALUE "CompanyName", "MariaDB Corporation AB"
             VALUE "FileDescription", "MariaDB ODBC Unicode Drvier"
-            VALUE "FileVersion", "3.0.2.0"
+            VALUE "FileVersion", "3.0.3.0"
             VALUE "InternalName", "ma_odbc_u"
             VALUE "LegalCopyright", "Copyright (C) 2013, 2017"
             VALUE "OriginalFilename", "maodbc.dll"
             VALUE "ProductName", "MariaDB ODBC Unicode Driver"
-            VALUE "ProductVersion", "3.0.2.0"
+            VALUE "ProductVersion", "3.0.3.0"
         END
     END
     BLOCK "VarFileInfo"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mariadb-connector-odbc-3.0.2-ga-src/odbc_3_api.c 
new/mariadb-connector-odbc-3.0.3-ga-src/odbc_3_api.c
--- old/mariadb-connector-odbc-3.0.2-ga-src/odbc_3_api.c        2017-10-09 
23:15:13.000000000 +0200
+++ new/mariadb-connector-odbc-3.0.3-ga-src/odbc_3_api.c        2018-02-06 
23:04:00.000000000 +0100
@@ -3089,23 +3089,25 @@
   MADB_Stmt *Stmt= (MADB_Stmt *)StatementHandle;
   SQLRETURN ret;
   char *CpCatalog= NULL,
-       *CpSchema= NULL,
        *CpTable= NULL;
-  SQLULEN CpLength1, CpLength2, CpLength3;
+  SQLULEN CpLength1= 0, CpLength3= 0;
 
   if (!Stmt)
     return SQL_INVALID_HANDLE;
   MADB_CLEAR_ERROR(&Stmt->Error);
 
-  CpCatalog= MADB_ConvertFromWChar(CatalogName, NameLength1, &CpLength1, 
&Stmt->Connection->charset, NULL);
-  CpSchema= MADB_ConvertFromWChar(SchemaName, NameLength2, &CpLength2, 
&Stmt->Connection->charset, NULL);
-  CpTable= MADB_ConvertFromWChar(TableName, NameLength3, &CpLength3, 
&Stmt->Connection->charset, NULL);
+  if (CatalogName != NULL)
+  {
+    CpCatalog= MADB_ConvertFromWChar(CatalogName, NameLength1, &CpLength1, 
&Stmt->Connection->charset, NULL);
+  }  
+  if (TableName != NULL)
+  {
+    CpTable=   MADB_ConvertFromWChar(TableName, NameLength3, &CpLength3, 
&Stmt->Connection->charset, NULL);
+  }
 
-  ret= Stmt->Methods->TablePrivileges(Stmt, CpCatalog, (SQLSMALLINT)CpLength1, 
CpSchema, (SQLSMALLINT)CpLength2,
-                                      CpTable, (SQLSMALLINT)CpLength3);
+  ret= Stmt->Methods->TablePrivileges(Stmt, CpCatalog, (SQLSMALLINT)CpLength1, 
NULL, 0, CpTable, (SQLSMALLINT)CpLength3);
 
   MADB_FREE(CpCatalog);
-  MADB_FREE(CpSchema);
   MADB_FREE(CpTable);
   return ret;
 }
Binary files 
old/mariadb-connector-odbc-3.0.2-ga-src/wininstall/WixUIBannerBmp.jpg and 
new/mariadb-connector-odbc-3.0.3-ga-src/wininstall/WixUIBannerBmp.jpg differ
Binary files 
old/mariadb-connector-odbc-3.0.2-ga-src/wininstall/WixUIDialogBmp.jpg and 
new/mariadb-connector-odbc-3.0.3-ga-src/wininstall/WixUIDialogBmp.jpg differ


Reply via email to