[Libreoffice-commits] core.git: libmariadb/mariadb-trunk-40.patch libmariadb/UnpackedTarball_mariadb.mk mysqlcppconn/patches

Lionel Elie Mamane lionel at mamane.lu
Thu Mar 14 14:12:17 PDT 2013


 libmariadb/UnpackedTarball_mariadb.mk                |    1 
 libmariadb/mariadb-trunk-40.patch                    |152418 +++++++++++++++++++
 mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch |   30 
 3 files changed, 152419 insertions(+), 30 deletions(-)

New commits:
commit dd4aa4debbb556117c9b9b9c755a9d9164d8dc25
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Mar 14 22:10:10 2013 +0100

    update to newer libmariadb
    
    Updated to bzr/launchpad snapshot revision 40
    Solves:
     - missing symbols mysql_library_init and mysql_library_end
     - missing parameter "cipher" to mysql_ssl_set
    
    Change-Id: I0266fbfa0fca89eb665cf6320afa5fb0dbfd7c84

diff --git a/libmariadb/UnpackedTarball_mariadb.mk b/libmariadb/UnpackedTarball_mariadb.mk
index a68562b..803bb1c 100644
--- a/libmariadb/UnpackedTarball_mariadb.mk
+++ b/libmariadb/UnpackedTarball_mariadb.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,mariadb,1))
 $(eval $(call gb_UnpackedTarball_add_patches,mariadb,\
     libmariadb/mariadb-thread.patch \
     libmariadb/mariadb-swap.patch \
+    libmariadb/mariadb-trunk-40.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/libmariadb/mariadb-trunk-40.patch b/libmariadb/mariadb-trunk-40.patch
new file mode 100644
index 0000000..a0082bc
--- /dev/null
+++ b/libmariadb/mariadb-trunk-40.patch
@@ -0,0 +1,152418 @@
+=== modified file 'CMakeLists.txt'
+--- mariadb/CMakeLists.txt	2012-11-28 21:44:42 +0000
++++ mariadb/CMakeLists.txt	2013-03-14 21:01:43 +0000
+@@ -1,35 +1,57 @@
+ # CMakeLists.txt
+ 
+ 
+-# This is the libmysql-lgpl project.
++# This is the LGPL libmariadb project.
+ PROJECT(mariadb-client C)
+ 
+ SET(CPACK_PACKAGE_VERSION_MAJOR 1)
+-SET(CPACK_PACKAGE_VERSION_MINOR 0)
++SET(CPACK_PACKAGE_VERSION_MINOR 1)
+ SET(CPACK_PACKAGE_VERSION_PATCH 0)
+ 
+-# Minimum required version is Cmake 2.6.x
+-CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
++# Minimum required version is Cmake 2.8.x
++CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
+ IF(COMMAND CMAKE_POLICY)
+   CMAKE_POLICY(SET CMP0003 NEW)
+-ENDIF(COMMAND CMAKE_POLICY)
++ENDIF()
++
++### Options ###
++IF(NOT WIN32)
++  OPTION(WITH_MYSQLCOMPAT "creates libmysql* symbolic links" ON)
++ENDIF()
++
++OPTION(WITH_SQLITE "Enables Sqlite support" ON)
++###############
++
+ 
+ IF(WIN32)
+   # Speedup system tests
+-  INCLUDE(${CMAKE_SOURCE_DIR}/WindowsCache.cmake)
++  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/WindowsCache.cmake)
++  IF (MSVC)
++    FOREACH(flag_var
++        CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
++        CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
++      IF(${flag_var} MATCHES "/MD")
++        STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
++      ENDIF()
++    ENDFOREACH(flag_var)
++  ENDIF()
+ ENDIF()
+ 
+ IF(UNIX)
+   SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+ ENDIF()
+ 
++IF(CMAKE_COMPILER_IS_GNUCC)
++  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wno-uninitialized")
++ENDIF()
++
+ # If the build type isn't specified, set to Relwithdebinfo as default.
+ IF(NOT CMAKE_BUILD_TYPE)
+   SET(CMAKE_BUILD_TYPE "Relwithdebinfo")
+ ENDIF()
+ 
+-
+ # various defines for generating include/mysql_version.h
++
+ SET(PROTOCOL_VERSION 10) # we adapted new password option from PHP's mysqlnd !
+ SET(MYSQL_CLIENT_VERSION_MAJOR "5")
+ SET(MYSQL_CLIENT_VERSION_MINOR "3")
+@@ -40,14 +62,15 @@
+                             ${MYSQL_CLIENT_VERSION_PATCH}")
+ IF (NOT MYSQL_PORT)
+   SET(MYSQL_PORT 3306)
+-ENDIF (NOT MYSQL_PORT)
++ENDIF ()
+ IF(NOT MYSQL_UNIX_ADDR)
+   SET(MYSQL_UNIX_ADDR "/tmp/mysql.sock")
+-ENDIF(NOT MYSQL_UNIX_ADDR)
++ENDIF()
+ 
+ # todo: we don't character sets in share - all is compiled in
+ SET(SHAREDIR "share")
+ SET(DEFAULT_CHARSET_HOME "${CMAKE_INSTALL_PREFIX}")
++SET(PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/plugin")
+ 
+ FIND_PACKAGE(Threads)
+ 
+@@ -72,13 +95,11 @@
+ ENDIF()
+ 
+ # check for various include files
+-INCLUDE(LibmysqlIncludeFiles.cmake)
++INCLUDE(${CMAKE_SOURCE_DIR}/cmake/CheckIncludeFiles.cmake)
+ # check for various functions
+-INCLUDE(LibmysqlFunctions.cmake)
++INCLUDE(${CMAKE_SOURCE_DIR}/cmake/CheckFunctions.cmake)
+ # check for various types
+-INCLUDE(LibmysqlTypes.cmake)
+-
+-
++INCLUDE(${CMAKE_SOURCE_DIR}/cmake/CheckTypes.cmake)
+ 
+ # Check for OpenSSL
+ FIND_PACKAGE(OpenSSL)
+@@ -88,6 +109,10 @@
+ 
+ FIND_PACKAGE(ZLIB QUIET)
+ 
++IF(WITH_SQLITE)
++  ADD_DEFINITIONS(-DHAVE_SQLITE)
++ENDIF()
++
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/mysql_version.h.in
+                ${CMAKE_CURRENT_BINARY_DIR}/include/mysql_version.h)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/my_config.h.in
+@@ -95,15 +120,16 @@
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
+ 
+-ADD_SUBDIRECTORY(libmysql)
++ADD_SUBDIRECTORY(plugins)
++ADD_SUBDIRECTORY(libmariadb)
+ ADD_SUBDIRECTORY(examples)
+ IF(NOT WIN32)
+-  ADD_SUBDIRECTORY(mysql_config)
++  ADD_SUBDIRECTORY(mariadb_config)
+ ENDIF()
+ 
+ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/unittest)
+   ADD_SUBDIRECTORY(unittest/mytap)
+-  ADD_SUBDIRECTORY(unittest/libmysql)
++  ADD_SUBDIRECTORY(unittest/libmariadb)
+ ENDIF()
+ 
+ IF(BUILD_DOCS)
+
+=== modified file 'README'
+--- mariadb/README	2012-11-26 10:23:56 +0000
++++ mariadb/README	2013-03-14 21:01:43 +0000
+@@ -4,10 +4,15 @@
+ This code is based on the LGPL libmysql client library from MySQL 3.23
+ and PHP's mysqlnd extension.
+ 
++This product includes PHP software, freely available from
++<http://www.php.net/software/>
++
+ The following are the main known limitations:
+ 
+-  - float to string conversion for prepared statements
+-    doesn't work correctly
++- double to string conversion for prepared statements
++  doesn't work correctly
++- support for dynamic columns is not integrated yet
++- Asynchronus interface is not integrated yet
+ 
+ If you want to be part of this development effort, you can discuss this at
+ maria-developers at lists.launchpad.org.
+
+=== added directory 'cmake'
+=== renamed file 'LibmysqlFunctions.cmake' => 'cmake/CheckFunctions.cmake'
+=== renamed file 'LibmysqlIncludeFiles.cmake' => 'cmake/CheckIncludeFiles.cmake'
+=== renamed file 'LibmysqlTypes.cmake' => 'cmake/CheckTypes.cmake'
+=== renamed file 'WindowsCache.cmake' => 'cmake/WindowsCache.cmake'
+=== modified file 'docs/funcref/functions.ent'
+--- mariadb/docs/funcref/functions.ent	2012-11-26 10:23:56 +0000
++++ mariadb/docs/funcref/functions.ent	2013-03-14 21:01:43 +0000
+@@ -1,97 +1,97 @@
+-<!ENTITY myodbc_remove_escape "funcref/myodbc_remove_escape.xml">
+-<!ENTITY mysql_affected_rows "funcref/mysql_affected_rows.xml">
+-<!ENTITY mysql_autocommit "funcref/mysql_autocommit.xml">
+-<!ENTITY mysql_change_user "funcref/mysql_change_user.xml">
+-<!ENTITY mysql_character_set_name "funcref/mysql_character_set_name.xml">
+-<!ENTITY mysql_close "funcref/mysql_close.xml">
+-<!ENTITY mysql_commit "funcref/mysql_commit.xml">
+-<!ENTITY mysql_data_seek "funcref/mysql_data_seek.xml">
+-<!ENTITY mysql_debug "funcref/mysql_debug.xml">
+-<!ENTITY mysql_dump_debug_info "funcref/mysql_dump_debug_info.xml">
+-<!ENTITY mysql_embedded "funcref/mysql_embedded.xml">
+-<!ENTITY mysql_eof "funcref/mysql_eof.xml">
+-<!ENTITY mysql_errno "funcref/mysql_errno.xml">
+-<!ENTITY mysql_error "funcref/mysql_error.xml">
+-<!ENTITY mysql_escape_string "funcref/mysql_escape_string.xml">
+-<!ENTITY mysql_fetch_field "funcref/mysql_fetch_field.xml">
+-<!ENTITY mysql_fetch_field_direct "funcref/mysql_fetch_field_direct.xml">
+-<!ENTITY mysql_fetch_fields "funcref/mysql_fetch_fields.xml">
+-<!ENTITY mysql_fetch_lengths "funcref/mysql_fetch_lengths.xml">
+-<!ENTITY mysql_fetch_row "funcref/mysql_fetch_row.xml">
+-<!ENTITY mysql_field_count "funcref/mysql_field_count.xml">
+-<!ENTITY mysql_field_seek "funcref/mysql_field_seek.xml">
+-<!ENTITY mysql_field_tell "funcref/mysql_field_tell.xml">
+-<!ENTITY mysql_free_result "funcref/mysql_free_result.xml">
+-<!ENTITY mysql_get_character_set_info "funcref/mysql_get_character_set_info.xml">
+-<!ENTITY mysql_get_client_info "funcref/mysql_get_client_info.xml">
+-<!ENTITY mysql_get_client_version "funcref/mysql_get_client_version.xml">
+-<!ENTITY mysql_get_host_info "funcref/mysql_get_host_info.xml">
+-<!ENTITY mysql_get_proto_info "funcref/mysql_get_proto_info.xml">
+-<!ENTITY mysql_get_server_info "funcref/mysql_get_server_info.xml">
+-<!ENTITY mysql_get_server_version "funcref/mysql_get_server_version.xml">
+-<!ENTITY mysql_get_ssl_cipher "funcref/mysql_get_ssl_cipher.xml">
+-<!ENTITY mysql_hex_string "funcref/mysql_hex_string.xml">
+-<!ENTITY mysql_info "funcref/mysql_info.xml">
+-<!ENTITY mysql_init "funcref/mysql_init.xml">
+-<!ENTITY mysql_insert_id "funcref/mysql_insert_id.xml">
+-<!ENTITY mysql_kill "funcref/mysql_kill.xml">
+-<!ENTITY mysql_more_results "funcref/mysql_more_results.xml">
+-<!ENTITY mysql_next_result "funcref/mysql_next_result.xml">
+-<!ENTITY mysql_num_fields "funcref/mysql_num_fields.xml">
+-<!ENTITY mysql_num_rows "funcref/mysql_num_rows.xml">
+-<!ENTITY mysql_options "funcref/mysql_options.xml">
+-<!ENTITY mysql_ping "funcref/mysql_ping.xml">
+-<!ENTITY mysql_query "funcref/mysql_query.xml">
+-<!ENTITY mysql_read_query_result "funcref/mysql_read_query_result.xml">
+-<!ENTITY mysql_real_connect "funcref/mysql_real_connect.xml">
+-<!ENTITY mysql_real_escape_string "funcref/mysql_real_escape_string.xml">
+-<!ENTITY mysql_real_query "funcref/mysql_real_query.xml">
+-<!ENTITY mysql_refresh "funcref/mysql_refresh.xml">
+-<!ENTITY mysql_rollback "funcref/mysql_rollback.xml">
+-<!ENTITY mysql_row_seek "funcref/mysql_row_seek.xml">
+-<!ENTITY mysql_row_tell "funcref/mysql_row_tell.xml">
+-<!ENTITY mysql_select_db "funcref/mysql_select_db.xml">
+-<!ENTITY mysql_send_query "funcref/mysql_send_query.xml">
+-<!ENTITY mysql_server_end "funcref/mysql_server_end.xml">
+-<!ENTITY mysql_server_init "funcref/mysql_server_init.xml">
+-<!ENTITY mysql_set_character_set "funcref/mysql_set_character_set.xml">
+-<!ENTITY mysql_set_server_option "funcref/mysql_set_server_option.xml">
+-<!ENTITY mysql_shutdown "funcref/mysql_shutdown.xml">
+-<!ENTITY mysql_sqlstate "funcref/mysql_sqlstate.xml">
+-<!ENTITY mysql_ssl_set "funcref/mysql_ssl_set.xml">
+-<!ENTITY mysql_stat "funcref/mysql_stat.xml">
+-<!ENTITY mysql_stmt_affected_rows "funcref/mysql_stmt_affected_rows.xml">
+-<!ENTITY mysql_stmt_attr_get "funcref/mysql_stmt_attr_get.xml">
+-<!ENTITY mysql_stmt_attr_set "funcref/mysql_stmt_attr_set.xml">
+-<!ENTITY mysql_stmt_bind_param "funcref/mysql_stmt_bind_param.xml">
+-<!ENTITY mysql_stmt_bind_result "funcref/mysql_stmt_bind_result.xml">
+-<!ENTITY mysql_stmt_close "funcref/mysql_stmt_close.xml">
+-<!ENTITY mysql_stmt_data_seek "funcref/mysql_stmt_data_seek.xml">
+-<!ENTITY mysql_stmt_errno "funcref/mysql_stmt_errno.xml">
+-<!ENTITY mysql_stmt_error "funcref/mysql_stmt_error.xml">
+-<!ENTITY mysql_stmt_execute "funcref/mysql_stmt_execute.xml">
+-<!ENTITY mysql_stmt_fetch "funcref/mysql_stmt_fetch.xml">
+-<!ENTITY mysql_stmt_fetch_column "funcref/mysql_stmt_fetch_column.xml">
+-<!ENTITY mysql_stmt_field_count "funcref/mysql_stmt_field_count.xml">
+-<!ENTITY mysql_stmt_free_result "funcref/mysql_stmt_free_result.xml">
+-<!ENTITY mysql_stmt_init "funcref/mysql_stmt_init.xml">
+-<!ENTITY mysql_stmt_insert_id "funcref/mysql_stmt_insert_id.xml">
+-<!ENTITY mysql_stmt_next_result "funcref/mysql_stmt_next_result.xml">
+-<!ENTITY mysql_stmt_num_rows "funcref/mysql_stmt_num_rows.xml">
+-<!ENTITY mysql_stmt_param_count "funcref/mysql_stmt_param_count.xml">
+-<!ENTITY mysql_stmt_param_metadata "funcref/mysql_stmt_param_metadata.xml">
+-<!ENTITY mysql_stmt_prepare "funcref/mysql_stmt_prepare.xml">
+-<!ENTITY mysql_stmt_reset "funcref/mysql_stmt_reset.xml">
+-<!ENTITY mysql_stmt_result_metadata "funcref/mysql_stmt_result_metadata.xml">
+-<!ENTITY mysql_stmt_row_seek "funcref/mysql_stmt_row_seek.xml">
+-<!ENTITY mysql_stmt_row_tell "funcref/mysql_stmt_row_tell.xml">
+-<!ENTITY mysql_stmt_send_long_data "funcref/mysql_stmt_send_long_data.xml">
+-<!ENTITY mysql_stmt_sqlstate "funcref/mysql_stmt_sqlstate.xml">
+-<!ENTITY mysql_stmt_store_result "funcref/mysql_stmt_store_result.xml">
+-<!ENTITY mysql_store_result "funcref/mysql_store_result.xml">
+-<!ENTITY mysql_thread_end "funcref/mysql_thread_end.xml">
+-<!ENTITY mysql_thread_id "funcref/mysql_thread_id.xml">
+-<!ENTITY mysql_thread_init "funcref/mysql_thread_init.xml">
+-<!ENTITY mysql_thread_safe "funcref/mysql_thread_safe.xml">
+-<!ENTITY mysql_use_result "funcref/mysql_use_result.xml">
+-<!ENTITY mysql_warning_count "funcref/mysql_warning_count.xml">
+\ No newline at end of file
++<!ENTITY functions.mysql_affected_rows "funcref/mysql_affected_rows.xml">
++<!ENTITY functions.mysql_autocommit "funcref/mysql_autocommit.xml">
++<!ENTITY functions.mysql_change_user "funcref/mysql_change_user.xml">
++<!ENTITY functions.mysql_character_set_name "funcref/mysql_character_set_name.xml">
++<!ENTITY functions.mysql_close "funcref/mysql_close.xml">
++<!ENTITY functions.mysql_commit "funcref/mysql_commit.xml">
++<!ENTITY functions.mysql_data_seek "funcref/mysql_data_seek.xml">
++<!ENTITY functions.mysql_debug "funcref/mysql_debug.xml">
++<!ENTITY functions.mysql_dump_debug_info "funcref/mysql_dump_debug_info.xml">
++<!ENTITY functions.mysql_embedded "funcref/mysql_embedded.xml">
++<!ENTITY functions.mysql_eof "funcref/mysql_eof.xml">
++<!ENTITY functions.mysql_errno "funcref/mysql_errno.xml">
++<!ENTITY functions.mysql_error "funcref/mysql_error.xml">
++<!ENTITY functions.mysql_escape_string "funcref/mysql_escape_string.xml">
++<!ENTITY functions.mysql_fetch_field "funcref/mysql_fetch_field.xml">
++<!ENTITY functions.mysql_fetch_field_direct "funcref/mysql_fetch_field_direct.xml">
++<!ENTITY functions.mysql_fetch_fields "funcref/mysql_fetch_fields.xml">
++<!ENTITY functions.mysql_fetch_lengths "funcref/mysql_fetch_lengths.xml">
++<!ENTITY functions.mysql_fetch_row "funcref/mysql_fetch_row.xml">
++<!ENTITY functions.mysql_field_count "funcref/mysql_field_count.xml">
++<!ENTITY functions.mysql_field_seek "funcref/mysql_field_seek.xml">
++<!ENTITY functions.mysql_field_tell "funcref/mysql_field_tell.xml">
++<!ENTITY functions.mysql_free_result "funcref/mysql_free_result.xml">
++<!ENTITY functions.mysql_get_character_set_info "funcref/mysql_get_character_set_info.xml">
++<!ENTITY functions.mysql_get_client_info "funcref/mysql_get_client_info.xml">
++<!ENTITY functions.mysql_get_client_version "funcref/mysql_get_client_version.xml">
++<!ENTITY functions.mysql_get_host_info "funcref/mysql_get_host_info.xml">
++<!ENTITY functions.mysql_get_proto_info "funcref/mysql_get_proto_info.xml">
++<!ENTITY functions.mysql_get_server_info "funcref/mysql_get_server_info.xml">
++<!ENTITY functions.mysql_get_server_name "funcref/mysql_get_server_name.xml">
++<!ENTITY functions.mysql_get_server_version "funcref/mysql_get_server_version.xml">
++<!ENTITY functions.mysql_get_ssl_cipher "funcref/mysql_get_ssl_cipher.xml">
++<!ENTITY functions.mysql_hex_string "funcref/mysql_hex_string.xml">
++<!ENTITY functions.mysql_info "funcref/mysql_info.xml">
++<!ENTITY functions.mysql_init "funcref/mysql_init.xml">
++<!ENTITY functions.mysql_insert_id "funcref/mysql_insert_id.xml">
++<!ENTITY functions.mysql_kill "funcref/mysql_kill.xml">
++<!ENTITY functions.mysql_more_results "funcref/mysql_more_results.xml">
++<!ENTITY functions.mysql_next_result "funcref/mysql_next_result.xml">
++<!ENTITY functions.mysql_num_fields "funcref/mysql_num_fields.xml">
++<!ENTITY functions.mysql_num_rows "funcref/mysql_num_rows.xml">
++<!ENTITY functions.mysql_options "funcref/mysql_options.xml">
++<!ENTITY functions.mysql_ping "funcref/mysql_ping.xml">
++<!ENTITY functions.mysql_query "funcref/mysql_query.xml">
++<!ENTITY functions.mysql_read_query_result "funcref/mysql_read_query_result.xml">
++<!ENTITY functions.mysql_real_connect "funcref/mysql_real_connect.xml">
++<!ENTITY functions.mysql_real_escape_string "funcref/mysql_real_escape_string.xml">
++<!ENTITY functions.mysql_real_query "funcref/mysql_real_query.xml">
++<!ENTITY functions.mysql_refresh "funcref/mysql_refresh.xml">
++<!ENTITY functions.mysql_rollback "funcref/mysql_rollback.xml">
++<!ENTITY functions.mysql_row_seek "funcref/mysql_row_seek.xml">
++<!ENTITY functions.mysql_row_tell "funcref/mysql_row_tell.xml">
++<!ENTITY functions.mysql_select_db "funcref/mysql_select_db.xml">
++<!ENTITY functions.mysql_send_query "funcref/mysql_send_query.xml">
++<!ENTITY functions.mysql_server_end "funcref/mysql_server_end.xml">
++<!ENTITY functions.mysql_server_init "funcref/mysql_server_init.xml">
++<!ENTITY functions.mysql_set_character_set "funcref/mysql_set_character_set.xml">
++<!ENTITY functions.mysql_set_server_option "funcref/mysql_set_server_option.xml">
++<!ENTITY functions.mysql_shutdown "funcref/mysql_shutdown.xml">
++<!ENTITY functions.mysql_sqlstate "funcref/mysql_sqlstate.xml">
++<!ENTITY functions.mysql_ssl_set "funcref/mysql_ssl_set.xml">
++<!ENTITY functions.mysql_stat "funcref/mysql_stat.xml">
++<!ENTITY functions.mysql_stmt_affected_rows "funcref/mysql_stmt_affected_rows.xml">
++<!ENTITY functions.mysql_stmt_attr_get "funcref/mysql_stmt_attr_get.xml">
++<!ENTITY functions.mysql_stmt_attr_set "funcref/mysql_stmt_attr_set.xml">
++<!ENTITY functions.mysql_stmt_bind_param "funcref/mysql_stmt_bind_param.xml">
++<!ENTITY functions.mysql_stmt_bind_result "funcref/mysql_stmt_bind_result.xml">
++<!ENTITY functions.mysql_stmt_close "funcref/mysql_stmt_close.xml">
++<!ENTITY functions.mysql_stmt_data_seek "funcref/mysql_stmt_data_seek.xml">
++<!ENTITY functions.mysql_stmt_errno "funcref/mysql_stmt_errno.xml">
++<!ENTITY functions.mysql_stmt_error "funcref/mysql_stmt_error.xml">
++<!ENTITY functions.mysql_stmt_execute "funcref/mysql_stmt_execute.xml">
++<!ENTITY functions.mysql_stmt_fetch "funcref/mysql_stmt_fetch.xml">
++<!ENTITY functions.mysql_stmt_fetch_column "funcref/mysql_stmt_fetch_column.xml">
++<!ENTITY functions.mysql_stmt_field_count "funcref/mysql_stmt_field_count.xml">
++<!ENTITY functions.mysql_stmt_free_result "funcref/mysql_stmt_free_result.xml">
++<!ENTITY functions.mysql_stmt_init "funcref/mysql_stmt_init.xml">
++<!ENTITY functions.mysql_stmt_insert_id "funcref/mysql_stmt_insert_id.xml">
++<!ENTITY functions.mysql_stmt_next_result "funcref/mysql_stmt_next_result.xml">
++<!ENTITY functions.mysql_stmt_num_rows "funcref/mysql_stmt_num_rows.xml">
++<!ENTITY functions.mysql_stmt_param_count "funcref/mysql_stmt_param_count.xml">
++<!ENTITY functions.mysql_stmt_param_metadata "funcref/mysql_stmt_param_metadata.xml">
++<!ENTITY functions.mysql_stmt_prepare "funcref/mysql_stmt_prepare.xml">
++<!ENTITY functions.mysql_stmt_reset "funcref/mysql_stmt_reset.xml">
++<!ENTITY functions.mysql_stmt_result_metadata "funcref/mysql_stmt_result_metadata.xml">
++<!ENTITY functions.mysql_stmt_row_seek "funcref/mysql_stmt_row_seek.xml">
++<!ENTITY functions.mysql_stmt_row_tell "funcref/mysql_stmt_row_tell.xml">
++<!ENTITY functions.mysql_stmt_send_long_data "funcref/mysql_stmt_send_long_data.xml">
++<!ENTITY functions.mysql_stmt_sqlstate "funcref/mysql_stmt_sqlstate.xml">
++<!ENTITY functions.mysql_stmt_store_result "funcref/mysql_stmt_store_result.xml">
++<!ENTITY functions.mysql_store_result "funcref/mysql_store_result.xml">
++<!ENTITY functions.mysql_thread_end "funcref/mysql_thread_end.xml">
++<!ENTITY functions.mysql_thread_id "funcref/mysql_thread_id.xml">
++<!ENTITY functions.mysql_thread_init "funcref/mysql_thread_init.xml">
++<!ENTITY functions.mysql_thread_safe "funcref/mysql_thread_safe.xml">
++<!ENTITY functions.mysql_use_result "funcref/mysql_use_result.xml">
++<!ENTITY functions.mysql_warning_count "funcref/mysql_warning_count.xml">
+
+=== removed file 'docs/funcref/myodbc_remove_escape.xml'
+--- mariadb/docs/funcref/myodbc_remove_escape.xml	2012-11-26 10:23:56 +0000
++++ mariadb/docs/funcref/myodbc_remove_escape.xml	1970-01-01 00:00:00 +0000
+@@ -1,40 +0,0 @@
+-<?xml version='1.0' encoding='UTF-8'?>
+-    <refentry id="functions.myodbc_remove_escape" display-name="0">
+-      <refmeta>
+-        <refentrytitle>myodbc_remove_escape</refentrytitle>
+-      </refmeta>
+-      <refnamediv>
+-        <refname>myodbc_remove_escape</refname>
+-        <refpurpose>@function_short_description@</refpurpose>
+-      </refnamediv>
+-      <refsect1 role="description">
+-        <methodsynopsis>
+-          <type>void</type>
+-          <methodname>myodbc_remove_escape</methodname>
+-           <methodparam><type>MYSQL *</type><parameter>mysql</parameter></methodparam>
+-           <methodparam><type>char *</type><parameter>name</parameter></methodparam>
+-
+-        </methodsynopsis>
+-        <para>@long_description@</para>
+-      </refsect1>
+-      <refsect1 role="parameters">
+-        <title>Parameters</title>
+-          <variablelist>
+-           <varlistentry><term><parameter>mysql</parameter></term><listitem><para>! todo !</para></listitem></varlistentry>
+-           <varlistentry><term><parameter>name</parameter></term><listitem><para>! todo !</para></listitem></varlistentry>
+-
+-          </variablelist>
+-      </refsect1>
+-      <refsect1 role="returnvalue">
+-        <title>Return value</title>
+-        <para>@return_value@</para>
+-      </refsect1>
+-      <refsect1 role="returnvalue">
+-        <note>
+-          <title></title>  
+-        </note> 
+-      </refsect1>
+-      <refsect1 role="seealso">
+-        <title>See also</title>
+-      </refsect1>
+-    </refentry>
+
+=== modified file 'docs/funcref/mysql_commit.xml'
+--- mariadb/docs/funcref/mysql_commit.xml	2012-11-26 10:23:56 +0000
++++ mariadb/docs/funcref/mysql_commit.xml	2013-03-14 21:01:43 +0000
+@@ -39,6 +39,6 @@
+       </refsect1>
+       <refsect1 role="seealso">
+         <title>See also</title>
+-        <para><function>mysql_rollback()</function></para>
++        <para><function>mysql_rollback</function></para>
+       </refsect1>
+     </refentry>
+
+=== added file 'docs/funcref/mysql_get_server_name.xml'
+--- mariadb/docs/funcref/mysql_get_server_name.xml	1970-01-01 00:00:00 +0000
++++ mariadb/docs/funcref/mysql_get_server_name.xml	2013-03-14 21:01:43 +0000
+@@ -0,0 +1,44 @@
++<?xml version='1.0' encoding='UTF-8'?>
++<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
++               "docbook/dtd/xml/4.2/docbookx.dtd" [
++<!ENTITY % global_ents SYSTEM "../global.ent">
++%global_ents;
++]>
++    <refentry id="functions.mysql_get_server_name" display-name="0">
++      <refmeta>
++        <refentrytitle>mysql_get_server_name</refentrytitle>
++      </refmeta>
++      <refnamediv>
++        <refname>mysql_get_server_name</refname>
++        <refpurpose>Returns the name of the connected database server</refpurpose>
++      </refnamediv>
++      <refsect1 role="description">
++        <methodsynopsis>
++          <type>const char *</type>
++          <methodname>mysql_get_server_name</methodname>
++          <methodparam><type>MYSQL *</type><parameter>mysql</parameter></methodparam>
++        </methodsynopsis>
++        <para>Returns the name of the connected database server.</para>
++      </refsect1>
++      <refsect1 role="parameters">
++        <title>Parameters</title>
++          <variablelist>
++           <varlistentry><term><parameter>mysql</parameter></term><listitem><para>&param.mysql;</para></listitem></varlistentry>
++          </variablelist>
++      </refsect1>
++      <refsect1 role="returnvalue">
++        <title>Return value</title>
++        <para>Returns the name of the connected database server.</para>
++      </refsect1>
++      <refsect1 role="notes">
++        <note>
++          <title></title>
++          <para>In case the connection is using a plugin to connect to a database
++          the name of the plugin will be returned.</para>
++        </note> 
++      </refsect1>
++      <refsect1 role="seealso">
++        <title>See also</title>
++        <para><function>mysql_options()</function>, <function>mysql_real_connect()</function></para>
++      </refsect1>
++    </refentry>
+
+=== modified file 'docs/funcref/mysql_options.xml'
+--- mariadb/docs/funcref/mysql_options.xml	2012-11-26 10:23:56 +0000
++++ mariadb/docs/funcref/mysql_options.xml	2013-03-14 21:01:43 +0000
+@@ -202,6 +202,19 @@
+                  </informalexample>
+                </listitem>
+              </varlistentry>
++             <varlistentry>
++               <term><parameter>MYSQL_OPT_DATABASE_DRIVER</parameter></term>
++               <listitem>
++                 <para>Specifies to load an alternative database driver for communication with other databases than MariaDB, e.g. sqlite.
++                   Database drivers are implemented by plugins. Mariadb client library provides built-in support for Sqlite.</para>
++                 <informalexample>
++                   <programlisting>
++mysql_options(mysql, MYSQL_DATABASE_DRIVER, "sqlite");  
++                   </programlisting>
++                 </informalexample>
++               </listitem>
++             </varlistentry>
++             
+             </variablelist>
+ </listitem></varlistentry>
+             <varlistentry><term><parameter>arg</parameter></term><listitem><para>The value for the option</para></listitem></varlistentry>
+
+=== modified file 'docs/funcref/mysql_real_escape_string.xml'
+--- mariadb/docs/funcref/mysql_real_escape_string.xml	2012-11-26 10:23:56 +0000
++++ mariadb/docs/funcref/mysql_real_escape_string.xml	2013-03-14 21:01:43 +0000
+@@ -19,7 +19,7 @@
+            <methodparam><type>MYSQL *</type><parameter>mysql</parameter></methodparam>
+            <methodparam><type>char *</type><parameter>to</parameter></methodparam>
+            <methodparam><type>const char *</type><parameter>from</parameter></methodparam>
+-           <methodparam><type>unsigned</type><parameter>long</parameter></methodparam>
++           <methodparam><type>unsigned long</type><parameter>length</parameter></methodparam>
+ 
+         </methodsynopsis>
+         <para>This function is used to create a legal SQL string that you can use in an SQL statement. The given string is encoded to an escaped SQL string, taking into account the current character set of the connection.</para>
+@@ -28,9 +28,9 @@
+         <title>Parameters</title>
+           <variablelist>
+            <varlistentry><term><parameter>mysql</parameter></term><listitem><para>&param.mysql;</para></listitem></varlistentry>
+-           <varlistentry><term><parameter>to</parameter></term><listitem><para>buffer for the encoded string. The size of this buffer must be length * 2 + 1 bytes: in worst case every character of the from stirng needs to be escaped. Additionally a trailing 0 character will be appended.</para></listitem></varlistentry>
++           <varlistentry><term><parameter>to</parameter></term><listitem><para>buffer for the encoded string. The size of this buffer must be length * 2 + 1 bytes: in worst case every character of the from string needs to be escaped. Additionally a trailing 0 character will be appended.</para></listitem></varlistentry>
+            <varlistentry><term><parameter>from</parameter></term><listitem><para>An string which will be encoded by <function>mysql_real_escape_string()</function>.</para></listitem></varlistentry>
+-           <varlistentry><term><parameter>long</parameter></term><listitem><para>The length of <parameter>from</parameter> string.</para></listitem></varlistentry>
++           <varlistentry><term><parameter>length</parameter></term><listitem><para>The length of <parameter>from</parameter> string.</para></listitem></varlistentry>
+ 
+           </variablelist>
+       </refsect1>
+@@ -38,12 +38,6 @@
+         <title>Return value</title>
+         <para>Returns the length of the encoded (<parameter>to</parameter>) string.</para>
+       </refsect1>
+-      <refsect1 role="returnvalue">
+-        <note>
+-          <title></title>
+-          <para>todo!</para>
+-        </note> 
+-      </refsect1>
+       <refsect1 role="seealso">
+         <title>See also</title>
+       </refsect1>
+
+=== modified file 'docs/mariadb-client.xml'
+--- mariadb/docs/mariadb-client.xml	2012-11-26 10:23:56 +0000
++++ mariadb/docs/mariadb-client.xml	2013-03-14 21:01:43 +0000
+@@ -3,7 +3,6 @@
+                "docbook/dtd/xml/4.2/docbookx.dtd" [
+ <!ENTITY % global_ents SYSTEM "global.ent">
+ %global_ents;
+-<!ENTITY myodbc_remove_escape "funcref/myodbc_remove_escape.xml">
+ <!ENTITY mysql_affected_rows "funcref/mysql_affected_rows.xml">
+ <!ENTITY mysql_autocommit "funcref/mysql_autocommit.xml">
+ <!ENTITY mysql_change_user "funcref/mysql_change_user.xml">
+@@ -28,11 +27,13 @@
+ <!ENTITY mysql_field_tell "funcref/mysql_field_tell.xml">
+ <!ENTITY mysql_free_result "funcref/mysql_free_result.xml">
+ <!ENTITY mysql_get_character_set_info "funcref/mysql_get_character_set_info.xml">
++<!ENTITY mysql_get_character_set_info "funcref/mysql_get_server_name.xml">
+ <!ENTITY mysql_get_client_info "funcref/mysql_get_client_info.xml">
+ <!ENTITY mysql_get_client_version "funcref/mysql_get_client_version.xml">
+ <!ENTITY mysql_get_host_info "funcref/mysql_get_host_info.xml">
+ <!ENTITY mysql_get_proto_info "funcref/mysql_get_proto_info.xml">
+ <!ENTITY mysql_get_server_info "funcref/mysql_get_server_info.xml">
++<!ENTITY mysql_get_server_name "funcref/mysql_get_server_name.xml">
+ <!ENTITY mysql_get_server_version "funcref/mysql_get_server_version.xml">
+ <!ENTITY mysql_get_ssl_cipher "funcref/mysql_get_ssl_cipher.xml">
+ <!ENTITY mysql_hex_string "funcref/mysql_hex_string.xml">
+@@ -108,7 +109,6 @@
+   </section>
+   <section>
+     <title>Functions</title>
+-      <xi:include href="&myodbc_remove_escape;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_affected_rows;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_autocommit;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_change_user;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+@@ -138,6 +138,7 @@
+       <xi:include href="&mysql_get_host_info;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_get_proto_info;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_get_server_info;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
++      <xi:include href="&mysql_get_server_name;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_get_server_version;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_get_ssl_cipher;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+       <xi:include href="&mysql_hex_string;" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+=== modified file 'include/config-win.h'
+--- mariadb/include/config-win.h	2012-11-14 17:43:45 +0000
++++ mariadb/include/config-win.h	2013-03-14 21:01:43 +0000
+@@ -111,7 +111,7 @@
+ #define bool_defined
+ #define byte_defined
+ #define HUGE_PTR
+-#define STDCALL __stdcall           /* Used by libmysql.dll */
++#define STDCALL __stdcall           /* Used by libmariadb.dll */
+ 
+ #define VOID_SIGHANDLER
+ #define SIZEOF_CHAR		1
+
+=== modified file 'include/errmsg.h'
+--- mariadb/include/errmsg.h	2012-11-26 07:32:41 +0000
++++ mariadb/include/errmsg.h	2013-03-14 21:01:43 +0000
+@@ -71,5 +71,6 @@
+ #define CR_NEW_STMT_METADATA    2057
+ #define CR_AUTH_PLUGIN_CANNOT_LOAD 2058
+ #define CR_ALREADY_CONNECTED    2059
++#define CR_PLUGIN_FUNCTION_NOT_SUPPORTED 2060
+ 
+ #define SQLSTATE_UNKNOWN "HY000"
+
+=== modified file 'include/m_ctype.h'
+--- mariadb/include/m_ctype.h	2012-11-14 17:43:45 +0000
++++ mariadb/include/m_ctype.h	2013-03-14 21:01:43 +0000
+@@ -32,6 +32,8 @@
+ #define CHARSET_DIR	"charsets/"
+ #define MY_CS_NAME_SIZE 32
+ 
++#define MADB_DEFAULT_CHARSET_NAME "latin1"
++#define MADB_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
+ 
+ /* we use the mysqlnd implementation */
+ typedef struct charset_info_st
+@@ -56,4 +58,8 @@
+ 
+ size_t mysql_cset_escape_quotes(const CHARSET_INFO *cset, char *newstr,  const char *escapestr, size_t escapestr_len);
+ size_t mysql_cset_escape_slashes(const CHARSET_INFO *cset, char *newstr, const char *escapestr, size_t escapestr_len);
++char* madb_get_os_character_set();
++#ifdef _WIN32
++int madb_get_windows_cp(const char *charset);
++#endif
+ #endif
+
+=== renamed file 'include/my_secure.h' => 'include/ma_secure.h'
+--- mariadb/include/my_secure.h	2012-11-26 07:32:41 +0000
++++ mariadb/include/ma_secure.h	2013-03-14 21:01:43 +0000
+@@ -19,8 +19,8 @@
+    Part of this code includes code from the PHP project which
+    is freely available from http://www.php.net
+ *************************************************************************************/
+-#ifndef _my_secure_h_
+-#define _my_secure_h_
++#ifndef _ma_secure_h_
++#define _ma_secure_h_
+ 
+ #ifdef HAVE_OPENSSL
+ #include <mysql.h>
+@@ -40,4 +40,4 @@
+ void my_ssl_end();
+ 
+ #endif /* HAVE_OPENSSL */
+-#endif /* _my_secure_h_ */
++#endif /* _ma_secure_h_ */
+
+=== modified file 'include/my_config.h.in'
+--- mariadb/include/my_config.h.in	2012-11-14 17:43:45 +0000
++++ mariadb/include/my_config.h.in	2013-03-14 21:01:43 +0000
+@@ -137,6 +137,7 @@
+ #cmakedefine HAVE_SIGWAIT 1
+ #cmakedefine HAVE_SLEEP 1
+ #cmakedefine HAVE_SNPRINTF 1
++#cmakedefine HAVE_SQLITE 1
+ #cmakedefine HAVE_STPCPY 1
+ #cmakedefine HAVE_STRERROR 1
+ #cmakedefine HAVE_STRLCPY 1
+@@ -275,3 +276,4 @@
+ #cmakedefine HAVE_THREADS 1
+ #cmakedefine SHAREDIR "@SHAREDIR@"
+ #cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@"
++#cmakedefine PLUGINDIR "@PLUGINDIR@"
+
+=== modified file 'include/my_global.h'
+--- mariadb/include/my_global.h	2012-11-27 08:57:10 +0000
++++ mariadb/include/my_global.h	2013-03-14 21:01:43 +0000
+@@ -581,8 +581,8 @@
+ #define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
+ 			 /* Offset of filed f in structure t */
+ #define OFFSET(t, f)	((size_t)(char *)&((t *)0)->f)
+-#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size)
+-#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B))
++#define ADD_TO_PTR(ptr,size,type) (type) ((unsigned char*) (ptr)+size)
++#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((unsigned char*) (A) - (unsigned char*) (B))
+ 
+ #define NullS		(char *) 0
+ /* Nowdays we do not support MessyDos */
+@@ -698,9 +698,6 @@
+ typedef char		*my_string; /* String of characters */
+ typedef unsigned long	size_s; /* Size of strings (In string-funcs) */
+ typedef int		myf;	/* Type of MyFlags in my_funcs */
+-#ifndef byte_defined
+-typedef char		byte;	/* Smallest addressable unit */
+-#endif
+ typedef char		my_bool; /* Small bool */
+ #if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
+ typedef char		bool;	/* Ordinary boolean values 0 1 */
+
+=== modified file 'include/my_stmt.h'
+--- mariadb/include/my_stmt.h	2012-11-14 17:43:45 +0000
++++ mariadb/include/my_stmt.h	2013-03-14 21:01:43 +0000
+@@ -198,7 +198,7 @@
+ 
+   my_bool                  cursor_exists;
+ 
+-  MYSQL_CMD_BUFFER         cmd_buffer;
++  void                     *ext_stmt;
+   mysql_stmt_fetch_row_func fetch_row_func;
+   unsigned int             execute_count;/* count how many times the stmt was executed */
+   mysql_stmt_use_or_store_func default_rset_handler;
+@@ -206,18 +206,17 @@
+ };
+ 
+ typedef void (*ps_field_fetch_func)(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row);
+-struct st_mysql_perm_bind {
++typedef struct st_mysql_perm_bind {
+   ps_field_fetch_func func;
+   /* should be signed int */
+   int pack_len;
+   unsigned long max_len;
+-};
++} MYSQL_PS_CONVERSION;
+ 
+-extern struct st_mysql_perm_bind mysql_ps_fetch_functions[MYSQL_TYPE_GEOMETRY + 1];
++extern MYSQL_PS_CONVERSION mysql_ps_fetch_functions[MYSQL_TYPE_GEOMETRY + 1];
+ unsigned long net_safe_read(MYSQL *mysql);
+ void mysql_init_ps_subsystem(void);
+ unsigned long net_field_length(unsigned char **packet);
+-int simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg, size_t length, my_bool skipp_check);
+ /*
+  *  function prototypes
+  */
+@@ -255,3 +254,5 @@
+ my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length);
+ my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
+ my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
++MYSQL_RES* STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
++int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt);
+
+=== modified file 'include/my_sys.h'
+--- mariadb/include/my_sys.h	2012-11-14 17:43:45 +0000
++++ mariadb/include/my_sys.h	2013-03-14 21:01:43 +0000
+@@ -139,7 +139,7 @@
+ #define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
+ extern gptr my_realloc(gptr oldpoint, size_t Size,myf MyFlags);
+ extern void my_no_flags_free(gptr ptr);
+-extern gptr my_memdup(const byte *from, size_t length,myf MyFlags);
++extern gptr my_memdup(const unsigned char *from, size_t length,myf MyFlags);
+ extern my_string my_strdup(const char *from,myf MyFlags);
+ extern my_string my_strndup(const char *from, size_t length, myf MyFlags);
+ #define my_free(PTR,FG) my_no_flags_free(PTR)
+@@ -261,7 +261,7 @@
+   int	rc_seek,error,inited;
+   uint	rc_length,read_length,reclength;
+   my_off_t rc_record_pos,end_of_file;
+-  byte	*rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
++  unsigned char	*rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
+ #ifdef HAVE_AIOWAIT
+   int	use_async_io;
+   my_aio_result aio_result;
+@@ -298,8 +298,8 @@
+ typedef struct st_io_cache		/* Used when cacheing files */
+ {
+   my_off_t pos_in_file,end_of_file;
+-  byte	*rc_pos,*rc_end,*buffer,*rc_request_pos;
+-  int (*read_function)(struct st_io_cache *,byte *,uint);
++  unsigned char	*rc_pos,*rc_end,*buffer,*rc_request_pos;
++  int (*read_function)(struct st_io_cache *,unsigned char *,uint);
+   char *file_name;			/* if used with 'open_cached_file' */
+   char *dir,*prefix;
+   File file;
+@@ -414,18 +414,18 @@
+ extern int my_delete_with_symlink(const char *name, myf MyFlags);
+ extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
+ extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
+-extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags);
+-extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset,
++extern uint my_read(File Filedes,unsigned char *Buffer,uint Count,myf MyFlags);
++extern uint my_pread(File Filedes,unsigned char *Buffer,uint Count,my_off_t offset,
+ 		     myf MyFlags);
+ extern int my_rename(const char *from,const char *to,myf MyFlags);
+ extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags);
+ extern my_off_t my_tell(File fd,myf MyFlags);
+-extern uint my_write(File Filedes,const byte *Buffer,uint Count,
++extern uint my_write(File Filedes,const unsigned char *Buffer,uint Count,
+ 		     myf MyFlags);
+-extern uint my_pwrite(File Filedes,const byte *Buffer,uint Count,
++extern uint my_pwrite(File Filedes,const unsigned char *Buffer,uint Count,
+ 		      my_off_t offset,myf MyFlags);
+-extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags);
+-extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count,
++extern uint my_fread(FILE *stream,unsigned char *Buffer,uint Count,myf MyFlags);
++extern uint my_fwrite(FILE *stream,const unsigned char *Buffer,uint Count,
+ 		      myf MyFlags);
+ extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
+ extern my_off_t my_ftell(FILE *stream,myf MyFlags);
+@@ -436,7 +436,7 @@
+ extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...));
+ extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag);
+ extern int _sanity(const char *sFile,unsigned int uLine);
+-extern gptr _my_memdup(const byte *from, size_t length,
++extern gptr _my_memdup(const unsigned char *from, size_t length,
+ 		       const char *sFile, uint uLine,myf MyFlag);
+ extern my_string _my_strdup(const char *from, const char *sFile, uint uLine,
+ 			    myf MyFlag);
+@@ -517,18 +517,18 @@
+ extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
+ 			     uint reclength,enum cache_type type,
+ 			     pbool use_async_io);
+-extern int read_cache_record(RECORD_CACHE *info,byte *to);
++extern int read_cache_record(RECORD_CACHE *info,unsigned char *to);
+ extern int end_record_cache(RECORD_CACHE *info);
+ extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
+-			      const byte *record,uint length);
++			      const unsigned char *record,uint length);
+ extern int flush_write_cache(RECORD_CACHE *info);
+ extern long my_clock(void);
+ extern sig_handler sigtstp_handler(int signal_number);
+ extern void handle_recived_signals(void);
+ extern int init_key_cache(ulong use_mem,ulong leave_this_much_mem);
+-extern byte *key_cache_read(File file,my_off_t filepos,byte* buff,uint length,
++extern unsigned char *key_cache_read(File file,my_off_t filepos,unsigned char* buff,uint length,
+ 			    uint block_length,int return_buffer);
+-extern int key_cache_write(File file,my_off_t filepos,byte* buff,uint length,
++extern int key_cache_write(File file,my_off_t filepos,unsigned char* buff,uint length,
+ 			   uint block_length,int force_write);
+ extern int flush_key_blocks(int file, enum flush_type type);
+ extern void end_key_cache(void);
+@@ -545,12 +545,12 @@
+ extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
+ 			       my_off_t seek_offset,pbool use_async_io,
+ 			       pbool clear_cache);
+-extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
+-extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count);
++extern int _my_b_read(IO_CACHE *info,unsigned char *Buffer,uint Count);
++extern int _my_b_net_read(IO_CACHE *info,unsigned char *Buffer,uint Count);
+ extern int _my_b_get(IO_CACHE *info);
+-extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);
+-extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count);
+-extern int my_block_write(IO_CACHE *info, const byte *Buffer,
++extern int _my_b_async_read(IO_CACHE *info,unsigned char *Buffer,uint Count);
++extern int _my_b_write(IO_CACHE *info,const unsigned char *Buffer,uint Count);
++extern int my_block_write(IO_CACHE *info, const unsigned char *Buffer,
+ 			  uint Count, my_off_t pos);
+ extern int flush_io_cache(IO_CACHE *info);
+ extern int end_io_cache(IO_CACHE *info);
+@@ -571,8 +571,8 @@
+ extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
+ 	  uint init_alloc,uint alloc_increment CALLER_INFO_PROTO);
+ extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
+-extern byte *alloc_dynamic(DYNAMIC_ARRAY *array);
+-extern byte *pop_dynamic(DYNAMIC_ARRAY*);
++extern unsigned char *alloc_dynamic(DYNAMIC_ARRAY *array);
++extern unsigned char *pop_dynamic(DYNAMIC_ARRAY*);
+ extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
+ extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
+ extern void delete_dynamic(DYNAMIC_ARRAY *array);
+@@ -598,8 +598,8 @@
+ my_bool set_changeable_varval(const char *var, ulong val,
+ 			      CHANGEABLE_VAR *vars);
+ #ifdef HAVE_MLOCK
+-extern byte *my_malloc_lock(size_t length,myf flags);
+-extern void my_free_lock(byte *ptr,myf flags);
++extern unsigned char *my_malloc_lock(size_t length,myf flags);
++extern void my_free_lock(unsigned char *ptr,myf flags);
+ #else
+ #define my_malloc_lock(A,B) my_malloc((A),(B))
+ #define my_free_lock(A,B) my_free((A),(B))
+@@ -614,10 +614,10 @@
+ 		   int *argc, char ***argv);
+ void free_defaults(char **argv);
+ void print_defaults(const char *conf_file, const char **groups);
+-my_bool my_compress(byte *, ulong *, ulong *);
+-my_bool my_uncompress(byte *, ulong *, ulong *);
+-byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen);
+-ulong checksum(const byte *mem, uint count);
++my_bool my_compress(unsigned char *, ulong *, ulong *);
++my_bool my_uncompress(unsigned char *, ulong *, ulong *);
++unsigned char *my_compress_alloc(const unsigned char *packet, ulong *len, ulong *complen);
++ulong checksum(const unsigned char *mem, uint count);
+ 
+ #if defined(_MSC_VER) && !defined(_WIN32)
+ extern void sleep(int sec);
+
+=== modified file 'include/mysql.h'
+--- mariadb/include/mysql.h	2012-11-27 23:53:08 +0000
++++ mariadb/include/mysql.h	2013-03-14 21:01:43 +0000
+@@ -1,5 +1,6 @@
+ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+-   
++                 2012 by MontyProgram 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
+@@ -15,7 +16,7 @@
+    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+    MA 02111-1307, USA */
+ 
+-/* defines for the libmysql library */
++/* defines for the libmariadb library */
+ 
+ #ifndef _mysql_h
+ #define _mysql_h
+@@ -181,9 +182,10 @@
+   MYSQL_REPORT_DATA_TRUNCATION,
+   MYSQL_OPT_RECONNECT,
+   MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
+-  MYSQL_OPT_PLUGIN_DIR,
+-  MYSQL_OPT_DEFAULT_AUTH,
+-  MYSQL_OPT_PROGRESS_CALLBACK
++  MYSQL_PLUGIN_DIR,
++  MYSQL_DEFAULT_AUTH,
++  MYSQL_PROGRESS_CALLBACK,
++  MYSQL_DATABASE_DRIVER=255
+ };
+ 
+ enum mysql_status { MYSQL_STATUS_READY,
+@@ -207,7 +209,7 @@
+   unsigned int port, protocol;
+   unsigned long client_flag;
+   char *host,*user,*password,*unix_socket,*db;
+-  char *init_command;
++  struct st_dynamic_array *init_command;
+   char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
+   char *ssl_key;				/* PEM key file */
+   char *ssl_cert;				/* PEM cert file */
+@@ -232,14 +234,21 @@
+   struct st_mysql_options_extention *extension;
+ };
+ 
++typedef struct st_mariadb_db_driver
++{
++  struct st_mariadb_client_plugin_DB *plugin;
++  char *name;
++  void *buffer;
++} MARIADB_DB_DRIVER;
++
+ typedef struct st_mysql {
+   NET		net;			/* Communication parameters */
+-  unsigned char *unused;
+-  char		*host,*user,*passwd,*unix_socket,*server_version,*host_info;
+-  char		*info,*db;
++  void  *unused_0;
++  char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
++  char *info,*db;
+   const struct charset_info_st *charset;      /* character set */
+-  MYSQL_FIELD  *fields;
+-  MEM_ROOT     field_alloc;
++  MYSQL_FIELD *fields;
++  MEM_ROOT field_alloc;
+   my_ulonglong affected_rows;
+   my_ulonglong insert_id;		/* id if insert on table with NEXTNR */
+   my_ulonglong extra_info;		/* Used by mysqlshow */
+@@ -282,6 +291,7 @@
+                           double progress,
+                           const char *proc_info,
+                           unsigned int proc_info_length);
++  MARIADB_DB_DRIVER       *db_driver;
+ };
+ 
+ typedef struct st_mysql_res {
+@@ -305,6 +315,7 @@
+   MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
+ };
+ 
++
+ typedef struct st_mysql_time
+ {
+   unsigned int  year, month, day, hour, minute, second;
+@@ -370,7 +381,7 @@
+ MYSQL *		STDCALL mysql_init(MYSQL *mysql);
+ int		STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
+ 				      const char *cert, const char *ca,
+-				      const char *capath);
++				      const char *capath, const char *cipher);
+ const char *	STDCALL mysql_get_ssl_cipher(MYSQL *mysql);
+ int		STDCALL mysql_ssl_clear(MYSQL *mysql);
+ MYSQL *		STDCALL mysql_connect(MYSQL *mysql, const char *host,
+@@ -394,7 +405,7 @@
+ 					unsigned int length);
+ int		STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
+ int		STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
+-int		STDCALL mysql_shutdown(MYSQL *mysql);
++int		STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level);
+ int		STDCALL mysql_dump_debug_info(MYSQL *mysql);
+ int		STDCALL mysql_refresh(MYSQL *mysql,
+ 				     unsigned int refresh_options);
+@@ -413,7 +424,7 @@
+ MYSQL_RES *	STDCALL mysql_store_result(MYSQL *mysql);
+ MYSQL_RES *	STDCALL mysql_use_result(MYSQL *mysql);
+ int		STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
+-				      const char *arg);
++				      const void *arg);
+ void		STDCALL mysql_free_result(MYSQL_RES *result);
+ void		STDCALL mysql_data_seek(MYSQL_RES *result,
+ 					my_ulonglong offset);
+@@ -443,10 +454,38 @@
+                                     enum enum_mysql_set_option option);
+ const char * STDCALL mysql_get_client_info(void);
+ unsigned long STDCALL mysql_get_client_version(void);
++my_bool STDCALL mariadb_connection(MYSQL *mysql);
++const char * STDCALL mysql_get_server_name(MYSQL *mysql);
+ 
+ #include <my_stmt.h>
+   
++/* these methods can be overwritten by db plugins */
++struct st_mysql_methods {
++  MYSQL *(*db_connect)(MYSQL *mysql, const char *host, const char *user, const char *passwd,
++					   const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag);
++  void (*db_close)(MYSQL *mysql);
++  int (*db_command)(MYSQL *mysql,enum enum_server_command command, const char *arg,
++                    size_t length, my_bool skipp_check, void *opt_arg);
++  void (*db_skip_result)(MYSQL *mysql);
++  int (*db_read_query_result)(MYSQL *mysql);
++  MYSQL_DATA *(*db_read_rows)(MYSQL *mysql,MYSQL_FIELD *fields, unsigned int field_count);
++  int (*db_read_one_row)(MYSQL *mysql,unsigned int fields,MYSQL_ROW row, unsigned long *lengths);
++  /* prepared statements */
++  my_bool (*db_supported_buffer_type)(enum enum_field_types type);
++  my_bool (*db_read_prepare_response)(MYSQL_STMT *stmt);
++  int (*db_read_stmt_result)(MYSQL *mysql);
++  my_bool (*db_stmt_get_result_metadata)(MYSQL_STMT *stmt);
++  my_bool (*db_stmt_get_param_metadata)(MYSQL_STMT *stmt);
++  int (*db_stmt_read_all_rows)(MYSQL_STMT *stmt);
++  int (*db_stmt_fetch)(MYSQL_STMT *stmt, unsigned char **row);
++  int (*db_stmt_fetch_to_bind)(MYSQL_STMT *stmt, unsigned char *row);
++  void (*db_stmt_flush_unbuffered)(MYSQL_STMT *stmt);
++};
++
++/* synonyms/aliases functions */
+ #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
++#define mysql_library_init mysql_server_init
++#define mysql_library_end mysql_server_end
+ 
+ /* new api functions */
+ 
+
+=== modified file 'include/mysql/client_plugin.h'
+--- mariadb/include/mysql/client_plugin.h	2012-11-27 08:57:10 +0000
++++ mariadb/include/mysql/client_plugin.h	2013-03-14 21:01:43 +0000
+@@ -35,11 +35,12 @@
+ #endif
+ 
+ /* known plugin types */
+-#define MYSQL_CLIENT_reserved1               0
+-#define MYSQL_CLIENT_reserved2               1
++#define MYSQL_CLIENT_DB_PLUGIN               0
++#define MYSQL_CLIENT_reserved                1
+ #define MYSQL_CLIENT_AUTHENTICATION_PLUGIN   2
+ 
+ #define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION  0x0100
++#define MYSQL_CLIENT_DB_PLUGIN_INTERFACE_VERSION  0x0100
+ 
+ #define MYSQL_CLIENT_MAX_PLUGINS             3
+ 
+@@ -68,6 +69,32 @@
+ 
+ struct st_mysql;
+ 
++/********* database api plugin specific declarations **********/
++typedef struct st_mariadb_client_plugin_DB
++{
++  MYSQL_CLIENT_PLUGIN_HEADER
++  /* functions */
++  struct st_mysql_methods *methods;
++  /*
++  MYSQL * (*db_connect)(MYSQL *mysql,const char *host, const char *user,
++		                 const char *passwd, const char *db, uint port,
++                     const char *unix_socket,unsigned long client_flag);
++  void (*db_close)(MYSQL *mysql);
++  int (*db_query)(MYSQL *mysql, const char *query, size_t query_len);
++  int (*db_read_one_row)(MYSQL *mysql, uint fields, MYSQL_ROW row, 
++                         ulong *lengths);
++  MYSQL_DATA *(*db_read_all_rows)(MYSQL *mysql, 
++                                  MYSQL_FIELD *mysql_fields, uint fields);
++  void (*db_query_end)(MYSQL *mysql);
++  int (*db_stmt_prepare)(MYSQL_STMT *stmt, const char *stmt_str, ulong length);
++  my_bool (*db_stmt_close)(MYSQL_STMT *stmt);
++  my_bool (*is_supported_buffer_type)(enum enum_field_types type);
++  int (*db_stmt_fetch)(MYSQL_STMT *stmt);
++  int (*db_stmt_execute)(MYSQL_STMT *stmt); */
++} MARIADB_DB_PLUGIN;
++
++#define MARIADB_DB_DRIVER(a) ((a)->ext_db)
++
+ /******** authentication plugin specific declarations *********/
+ #include <mysql/plugin_auth_common.h>
+ 
+
+=== modified file 'include/mysql/plugin_auth.h'
+--- mariadb/include/mysql/plugin_auth.h	2012-11-14 17:43:45 +0000
++++ mariadb/include/mysql/plugin_auth.h	2013-03-14 21:01:43 +0000
+@@ -33,7 +33,7 @@
+ 
+ /**
+   Authentication failed. Additionally, all other CR_xxx values
+-  (libmysql error code) can be used too.
++  (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
+@@ -46,7 +46,7 @@
+   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 libmysql reads the next packet expecting
++  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
+@@ -54,7 +54,7 @@
+   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, libmysql will not read a packet from the server,
++  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
+
+=== modified file 'include/mysql/plugin_auth_common.h'
+--- mariadb/include/mysql/plugin_auth_common.h	2012-11-14 17:43:45 +0000
++++ mariadb/include/mysql/plugin_auth_common.h	2013-03-14 21:01:43 +0000
+@@ -33,7 +33,7 @@
+ 
+ /**
+   Authentication failed. Additionally, all other CR_xxx values
+-  (libmysql error code) can be used too.
++  (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
+@@ -46,7 +46,7 @@
+   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 libmysql reads the next packet expecting
++  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
+@@ -54,7 +54,7 @@
+   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, libmysql will not read a packet from the server,
++  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
+
+=== modified file 'include/mysql_com.h'
+--- mariadb/include/mysql_com.h	2012-11-27 08:57:10 +0000
++++ mariadb/include/mysql_com.h	2013-03-14 21:01:43 +0000
+@@ -48,6 +48,12 @@
+ #define MYSQL_SERVICENAME "MySql"
+ #endif /* _WIN32 */
+ 
++enum mysql_enum_shutdown_level
++{
++  SHUTDOWN_DEFAULT = 0,
++  KILL_QUERY= 254,
++  KILL_CONNECTION= 255
++};
+ 
+ enum enum_server_command
+ {
+@@ -147,7 +153,6 @@
+ #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
+ 
+ #define CLIENT_SUPPORTED_FLAGS  (CLIENT_LONG_PASSWORD | \
+-                                 CLIENT_LONG_PASSWORD |\
+                                  CLIENT_FOUND_ROWS |\
+                                  CLIENT_LONG_FLAG |\
+                                  CLIENT_CONNECT_WITH_DB |\
+@@ -189,7 +194,9 @@
+ #define SERVER_STATUS_LAST_ROW_SENT        128
+ #define SERVER_STATUS_DB_DROPPED           256 
+ #define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
+-
++#define SERVER_STATUS_METADATA_CHANGED    1024
++#define SERVER_QUERY_WAS_SLOW             2048
++#define SERVER_PS_OUT_PARAMS              4096
+ 
+ #define MYSQL_ERRMSG_SIZE	512
+ #define NET_READ_TIMEOUT	30		/* Timeout on read */
+@@ -215,7 +222,6 @@
+   unsigned char *buff_end,*write_pos,*read_pos;
+   my_socket fd;					/* For Perl DBI/dbd */
+   unsigned long remain_in_buf,length;
+-  unsigned long cmd_buffer_length;
+   unsigned long buf_length, where_b;
+   unsigned long max_packet, max_packet_size;
+   unsigned int pkt_nr, compress_pkt_nr;
+
+=== modified file 'include/mysqld_error.h'
+--- mariadb/include/mysqld_error.h	2012-11-14 17:43:45 +0000
++++ mariadb/include/mysqld_error.h	2013-03-14 21:01:43 +0000
+@@ -1,8 +1,9 @@
+-/* This file is automaticly generated from errmsg.sys ; Do not edit! */
+-/* mysqld server error messagenumbers */
++/* This file was automatically generated from errmsg.sys.
++   Todo: Several error messages are no longer in use
++ */
+ 
+-#define ER_HASHCHK 1000
+-#define ER_NISAMCHK 1001
++#define ER_HASHCHK 1000  /* no longer in use ?! */
++#define ER_NISAMCHK 1001 /* no longer in use ? */
+ #define ER_NO 1002
+ #define ER_YES 1003
+ #define ER_CANT_CREATE_FILE 1004
+@@ -10,7 +11,7 @@
+ #define ER_CANT_CREATE_DB 1006
+ #define ER_DB_CREATE_EXISTS 1007
+ #define ER_DB_DROP_EXISTS 1008
+-#define ER_DB_DROP_DELETE 1009
++#define ER_DB_DROP_DELETE 1009 /* no longer in use ?! */
+ #define ER_DB_DROP_RMDIR 1010
+ #define ER_CANT_DELETE_FILE 1011
+ #define ER_CANT_FIND_SYSTEM_REC 1012
+@@ -30,7 +31,7 @@
+ #define ER_ERROR_ON_WRITE 1026
+ #define ER_FILE_USED 1027
+ #define ER_FILSORT_ABORT 1028
+-#define ER_FORM_NOT_FOUND 1029
++#define ER_FORM_NOT_FOUND 1029 /* no longer in use ?! */
+ #define ER_GET_ERRNO 1030
+ #define ER_ILLEGAL_HA 1031
+ #define ER_KEY_NOT_FOUND 1032
+@@ -77,7 +78,7 @@
+ #define ER_BLOB_USED_AS_KEY 1073
+ #define ER_TOO_BIG_FIELDLENGTH 1074
+ #define ER_WRONG_AUTO_KEY 1075
+-#define ER_READY 1076
++#define ER_READY 1076 /* no longer in use !? */
+ #define ER_NORMAL_SHUTDOWN 1077
+ #define ER_GOT_SIGNAL 1078
+ #define ER_SHUTDOWN_COMPLETE 1079
+@@ -89,12 +90,12 @@
+ #define ER_TEXTFILE_NOT_READABLE 1085
+ #define ER_FILE_EXISTS_ERROR 1086
+ #define ER_LOAD_INFO 1087
+-#define ER_ALTER_INFO 1088
++#define ER_ALTER_INFO 1088 /* no longer in use !? */
+ #define ER_WRONG_SUB_KEY 1089
+ #define ER_CANT_REMOVE_ALL_FIELDS 1090
+ #define ER_CANT_DROP_FIELD_OR_KEY 1091
+ #define ER_INSERT_INFO 1092
+-#define ER_INSERT_TABLE_USED 1093
++#define ER_INSERT_TABLE_USED 1093 /* no longer in use !? */
+ #define ER_NO_SUCH_THREAD 1094
+ #define ER_KILL_DENIED_ERROR 1095
+ #define ER_NO_TABLES_USED 1096
+@@ -133,29 +134,29 @@
+ #define ER_HOST_IS_BLOCKED 1129
+ #define ER_HOST_NOT_PRIVILEGED 1130
+ #define ER_PASSWORD_ANONYMOUS_USER 1131
+-#define ER_PASSWORD_NOT_ALLOWED 1132
++#define ER_PASSWORD_NOT_ALLOWED 1132 /* no longer in use !? */
+ #define ER_PASSWORD_NO_MATCH 1133
+ #define ER_UPDATE_INFO 1134
+ #define ER_CANT_CREATE_THREAD 1135
+ #define ER_WRONG_VALUE_COUNT_ON_ROW 1136
+ #define ER_CANT_REOPEN_TABLE 1137
+-#define ER_INVALID_USE_OF_NULL 1138
++#define ER_INVALID_USE_OF_NULL 1138 /* no longer in use !? */
+ #define ER_REGEXP_ERROR 1139
+ #define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140
+ #define ER_NONEXISTING_GRANT 1141
+ #define ER_TABLEACCESS_DENIED_ERROR 1142
+ #define ER_COLUMNACCESS_DENIED_ERROR 1143
+ #define ER_ILLEGAL_GRANT_FOR_TABLE 1144
+-#define ER_GRANT_WRONG_HOST_OR_USER 1145
++#define ER_GRANT_WRONG_HOST_OR_USER 1145 /* no longer in use !? */
+ #define ER_NO_SUCH_TABLE 1146
+ #define ER_NONEXISTING_TABLE_GRANT 1147
+ #define ER_NOT_ALLOWED_COMMAND 1148
+ #define ER_SYNTAX_ERROR 1149
+ #define ER_DELAYED_CANT_CHANGE_LOCK 1150
+-#define ER_TOO_MANY_DELAYED_THREADS 1151
+-#define ER_ABORTING_CONNECTION 1152
++#define ER_TOO_MANY_DELAYED_THREADS 1151 /* no longer in use !? */
++#define ER_ABORTING_CONNECTION 1152 /* no longer in use !? */
+ #define ER_NET_PACKET_TOO_LARGE 1153
+-#define ER_NET_READ_ERROR_FROM_PIPE 1154
++#define ER_NET_READ_ERROR_FROM_PIPE 1154 /* no longer in use !? */
+ #define ER_NET_FCNTL_ERROR 1155
+ #define ER_NET_PACKETS_OUT_OF_ORDER 1156
+ #define ER_NET_UNCOMPRESS_ERROR 1157
+@@ -163,7 +164,7 @@
+ #define ER_NET_READ_INTERRUPTED 1159
+ #define ER_NET_ERROR_ON_WRITE 1160
+ #define ER_NET_WRITE_INTERRUPTED 1161
+-#define ER_TOO_LONG_STRING 1162
++#define ER_TOO_LONG_STRING 1162 /* no longer in use !? */
+ #define ER_TABLE_CANT_HANDLE_BLOB 1163
+ #define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164
+ #define ER_DELAYED_INSERT_TABLE_LOCKED 1165
+@@ -175,23 +176,23 @@
+ #define ER_PRIMARY_CANT_HAVE_NULL 1171
+ #define ER_TOO_MANY_ROWS 1172
+ #define ER_REQUIRES_PRIMARY_KEY 1173
+-#define ER_NO_RAID_COMPILED 1174
++#define ER_NO_RAID_COMPILED 1174 /* no longer in use !? */
+ #define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175
+ #define ER_KEY_DOES_NOT_EXITS 1176
+ #define ER_CHECK_NO_SUCH_TABLE 1177
+ #define ER_CHECK_NOT_IMPLEMENTED 1178
+-#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179
++#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179 /* no longer in use !? */
+ #define ER_ERROR_DURING_COMMIT 1180
+ #define ER_ERROR_DURING_ROLLBACK 1181
+ #define ER_ERROR_DURING_FLUSH_LOGS 1182
+-#define ER_ERROR_DURING_CHECKPOINT 1183
++#define ER_ERROR_DURING_CHECKPOINT 1183 /* no longer in use !? */
+ #define ER_NEW_ABORTING_CONNECTION 1184
+-#define ER_DUMP_NOT_IMPLEMENTED    1185
++#define ER_DUMP_NOT_IMPLEMENTED    1185 /* no longer in use !? */
+ #define ER_FLUSH_MASTER_BINLOG_CLOSED 1186
+-#define ER_INDEX_REBUILD  1187
++#define ER_INDEX_REBUILD  1187 /* no longer in use !? */
+ #define ER_MASTER 1188
+-#define ER_MASTER_NET_READ 1189
+-#define ER_MASTER_NET_WRITE 1190
++#define ER_MASTER_NET_READ 1189 /* no longer in use !? */
++#define ER_MASTER_NET_WRITE 1190 /* no longer in use !? */
+ #define ER_FT_MATCHING_KEY_NOT_FOUND 1191
+ #define ER_LOCK_OR_ACTIVE_TRANSACTION 1192
+ #define ER_UNKNOWN_SYSTEM_VARIABLE 1193
+@@ -209,14 +210,563 @@
+ #define ER_LOCK_WAIT_TIMEOUT 1205
+ #define ER_LOCK_TABLE_FULL 1206
+ #define ER_READ_ONLY_TRANSACTION 1207
+-#define ER_DROP_DB_WITH_READ_LOCK 1208
+-#define ER_CREATE_DB_WITH_READ_LOCK 1209
++#define ER_DROP_DB_WITH_READ_LOCK 1208 /* no longer in use !? */
++#define ER_CREATE_DB_WITH_READ_LOCK 1209 /* no longer in use !? */
+ #define ER_WRONG_ARGUMENTS 1210
+-#define ER_NO_PERMISSION_TO_CREATE_USER 1211
+-#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212
++#define ER_NO_PERMISSION_TO_CREATE_USER 1211 /* no longer in use !? */
++#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212 /* no longer in use !? */
+ #define ER_LOCK_DEADLOCK 1213
+-#define ER_TABLE_CANT_HANDLE_FULLTEXT 1214
++#define ER_TABLE_CANT_HANDLE_FULLTEXT 1214 /* no longer in use !? */
+ #define ER_CANNOT_ADD_FOREIGN 1215
+ #define ER_NO_REFERENCED_ROW 1216
+ #define ER_ROW_IS_REFERENCED 1217
+-#define ER_ERROR_MESSAGES 218
++
++/* new server messages (added after 3.23.49) */
++#define ER_CONNECT_TO_MASTER 1218 /* no longer in use !? */
++#define ER_QUERY_ON_MASTER 1219 /* no longer in use !? */
++#define ER_ERROR_WHEN_EXECUTING_COMMAND 1220
++#define ER_WRONG_USAGE 1221
++#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222
++#define ER_CANT_UPDATE_WITH_READLOCK 1223 /* no longer in use !? */
++#define ER_MIXING_NOT_ALLOWED 1224 /* no longer in use !? */
++#define ER_DUP_ARGUMENT 1225
++#define ER_USER_LIMIT_REACHED 1226
++#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
++#define ER_LOCAL_VARIABLE 1228
++#define ER_GLOBAL_VARIABLE 1229
++#define ER_NO_DEFAULT 1230
++#define ER_WRONG_VALUE_FOR_VAR 1231
++#define ER_WRONG_TYPE_FOR_VAR 1232
++#define ER_VAR_CANT_BE_READ 1233
++#define ER_CANT_USE_OPTION_HERE 1234
++#define ER_NOT_SUPPORTED_YET 1235
++#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
++#define ER_SLAVE_IGNORED_TABLE 1237
++#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238
++#define ER_WRONG_FK_DEF 1239
++#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240
++#define ER_OPERAND_COLUMNS 1241
++#define ER_SUBQUERY_NO_1_ROW 1242
++#define ER_UNKNOWN_STMT_HANDLER 1243
++#define ER_CORRUPT_HELP_DB 1244
++#define ER_CYCLIC_REFERENCE 1245 /* no longer in use ?! */
++#define ER_AUTO_CONVERT 1246
++#define ER_ILLEGAL_REFERENCE 1247
++#define ER_DERIVED_MUST_HAVE_ALIAS 1248
++#define ER_SELECT_REDUCED 1249
++#define ER_TABLENAME_NOT_ALLOWED_HERE 1250
++#define ER_NOT_SUPPORTED_AUTH_MODE 1251
++#define ER_SPATIAL_CANT_HAVE_NULL 1252
++#define ER_COLLATION_CHARSET_MISMATCH 1253
++#define ER_SLAVE_WAS_RUNNING 1254
++#define ER_SLAVE_WAS_NOT_RUNNING 1255
++#define ER_TOO_BIG_FOR_UNCOMPRESS 1256
++#define ER_ZLIB_Z_MEM_ERROR 1257
++#define ER_ZLIB_Z_BUF_ERROR 1258
++#define ER_ZLIB_Z_DATA_ERROR 1259
++#define ER_CUT_VALUE_GROUP_CONCAT 1260
++#define ER_WARN_TOO_FEW_RECORDS 1261
++#define ER_WARN_TOO_MANY_RECORDS 1262
++#define ER_WARN_NULL_TO_NOTNULL 1263
++#define ER_WARN_DATA_OUT_OF_RANGE 1264
++#define WARN_DATA_TRUNCATED 1265
++#define ER_WARN_USING_OTHER_HANDLER 1266
++#define ER_CANT_AGGREGATE_2COLLATIONS 1267
++#define ER_DROP_USER 1268 /* no longer in use ?! */
++#define ER_REVOKE_GRANTS 1269
++#define ER_CANT_AGGREGATE_3COLLATIONS 1270
++#define ER_CANT_AGGREGATE_NCOLLATIONS 1271
++#define ER_VARIABLE_IS_NOT_STRUCT 1272
++#define ER_UNKNOWN_COLLATION 1273
++#define ER_SLAVE_IGNORED_SSL_PARAMS 1274
++#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275
++#define ER_WARN_FIELD_RESOLVED 1276
++#define ER_BAD_SLAVE_UNTIL_COND 1277
++#define ER_MISSING_SKIP_SLAVE 1278
++#define ER_UNTIL_COND_IGNORED 1279
++#define ER_WRONG_NAME_FOR_INDEX 1280
++#define ER_WRONG_NAME_FOR_CATALOG 1281 /* no longer in use ?! */
++#define ER_WARN_QC_RESIZE 1282
++#define ER_BAD_FT_COLUMN 1283
++#define ER_UNKNOWN_KEY_CACHE 1284
++#define ER_WARN_HOSTNAME_WONT_WORK 1285
++#define ER_UNKNOWN_STORAGE_ENGINE 1286
++#define ER_WARN_DEPRECATED_SYNTAX 1287
++#define ER_NON_UPDATABLE_TABLE 1288
++#define ER_FEATURE_DISABLED 1289
++#define ER_OPTION_PREVENTS_STATEMENT 1290
++#define ER_DUPLICATED_VALUE_IN_TYPE 1291
++#define ER_TRUNCATED_WRONG_VALUE 1292
++#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293
++#define ER_INVALID_ON_UPDATE 1294
++#define ER_UNSUPPORTED_PS 1295
++#define ER_GET_ERRMSG 1296
++#define ER_GET_TEMPORARY_ERRMSG 1297
++#define ER_UNKNOWN_TIME_ZONE 1298
++#define ER_WARN_INVALID_TIMESTAMP 1299
++#define ER_INVALID_CHARACTER_STRING 1300
++#define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301
++#define ER_CONFLICTING_DECLARATIONS 1302
++#define ER_SP_NO_RECURSIVE_CREATE 1303
++#define ER_SP_ALREADY_EXISTS 1304
++#define ER_SP_DOES_NOT_EXIST 1305
++#define ER_SP_DROP_FAILED 1306
++#define ER_SP_STORE_FAILED 1307
++#define ER_SP_LILABEL_MISMATCH 1308
++#define ER_SP_LABEL_REDEFINE 1309
++#define ER_SP_LABEL_MISMATCH 1310
++#define ER_SP_UNINIT_VAR 1311 /* no longer in use ?! */
++#define ER_SP_BADSELECT 1312
++#define ER_SP_BADRETURN 1313
++#define ER_SP_BADSTATEMENT 1314
++#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1315 /* no longer in use ?! */
++#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1316 /* no longer in use ?! */
++#define ER_QUERY_INTERRUPTED 1317
++#define ER_SP_WRONG_NO_OF_ARGS 1318
++#define ER_SP_COND_MISMATCH 1319
++#define ER_SP_NORETURN 1320
++#define ER_SP_NORETURNEND 1321
++#define ER_SP_BAD_CURSOR_QUERY 1322
++#define ER_SP_BAD_CURSOR_SELECT 1323
++#define ER_SP_CURSOR_MISMATCH 1324
++#define ER_SP_CURSOR_ALREADY_OPEN 1325
++#define ER_SP_CURSOR_NOT_OPEN 1326
++#define ER_SP_UNDECLARED_VAR 1327
++#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1328
++#define ER_SP_FETCH_NO_DATA 1329
++#define ER_SP_DUP_PARAM 1330
++#define ER_SP_DUP_VAR 1331
++#define ER_SP_DUP_COND 1332
++#define ER_SP_DUP_CURS 1333
++#define ER_SP_CANT_ALTER 1334
++#define ER_SP_SUBSELECT_NYI 1335 /* no longer in use ?! */
++#define ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 1336 /* no longer in use ?! */
++#define ER_SP_VARCOND_AFTER_CURSHNDLR 1337
++#define ER_SP_CURSOR_AFTER_HANDLER 1338
++#define ER_SP_CASE_NOT_FOUND 1339
++#define ER_FPARSER_TOO_BIG_FILE 1340
++#define ER_FPARSER_BAD_HEADER 1341
++#define ER_FPARSER_EOF_IN_COMMENT 1342
++#define ER_FPARSER_ERROR_IN_PARAMETER 1343
++#define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1344
++#define ER_VIEW_NO_EXPLAIN 1345
++#define ER_FRM_UNKNOWN_TYPE 1346
++#define ER_WRONG_OBJECT 1347
++#define ER_NONUPDATEABLE_COLUMN 1348
++#define ER_VIEW_SELECT_DERIVED 1349
++#define ER_VIEW_SELECT_CLAUSE 1350
++#define ER_VIEW_SELECT_VARIABLE 1351
++#define ER_VIEW_SELECT_TMPTABLE 1352
++#define ER_VIEW_WRONG_LIST 1353
++#define ER_WARN_VIEW_MERGE 1354
++#define ER_WARN_VIEW_WITHOUT_KEY 1355
++#define ER_VIEW_INVALID 1356
++#define ER_SP_NO_DROP_SP 1357
++#define ER_SP_GOTO_IN_HNDLR 1358 /* no longer in use ?! */
++#define ER_TRG_ALREADY_EXISTS 1359
++#define ER_TRG_DOES_NOT_EXIST 1360
++#define ER_TRG_ON_VIEW_OR_TEMP_TABLE 1361
++#define ER_TRG_CANT_CHANGE_ROW 1362
++#define ER_TRG_NO_SUCH_ROW_IN_TRG 1363
++#define ER_NO_DEFAULT_FOR_FIELD 1364
++#define ER_DIVISION_BY_ZERO 1365
++#define ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 1366
++#define ER_ILLEGAL_VALUE_FOR_TYPE 1367
++#define ER_VIEW_NONUPD_CHECK 1368
++#define ER_VIEW_CHECK_FAILED 1369
++#define ER_PROCACCESS_DENIED_ERROR 1370
++#define ER_RELAY_LOG_FAIL 1371
++#define ER_PASSWD_LENGTH 1372
++#define ER_UNKNOWN_TARGET_BINLOG 1373
++#define ER_IO_ERR_LOG_INDEX_READ 1374
++#define ER_BINLOG_PURGE_PROHIBITED 1375
++#define ER_FSEEK_FAIL 1376
++#define ER_BINLOG_PURGE_FATAL_ERR 1377
++#define ER_LOG_IN_USE 1378
++#define ER_LOG_PURGE_UNKNOWN_ERR 1379
++#define ER_RELAY_LOG_INIT 1380
++#define ER_NO_BINARY_LOGGING 1381
++#define ER_RESERVED_SYNTAX 1382
++#define ER_WSAS_FAILED 1383 /* no longer in use ?! */
++#define ER_DIFF_GROUPS_PROC 1384
++#define ER_NO_GROUP_FOR_PROC 1385 /* no longer in use ?! */
++#define ER_ORDER_WITH_PROC 1386
++#define ER_LOGGING_PROHIBIT_CHANGING_OF 1387 /* no longer in use ?! */
++#define ER_NO_FILE_MAPPING 1388 /* no longer in use ?! */
++#define ER_WRONG_MAGIC 1389 /* no longer in use ?! */
++#define ER_PS_MANY_PARAM 1390
++#define ER_KEY_PART_0 1391
++#define ER_VIEW_CHECKSUM 1392
++#define ER_VIEW_MULTIUPDATE 1393
++#define ER_VIEW_NO_INSERT_FIELD_LIST 1394
++#define ER_VIEW_DELETE_MERGE_VIEW 1395
++#define ER_CANNOT_USER 1396
++#define ER_XAER_NOTA 1397
++#define ER_XAER_INVAL 1398
++#define ER_XAER_RMFAIL 1399
++#define ER_XAER_OUTSIDE 1400
++#define ER_XAER_RMERR 1401
++#define ER_XA_RBROLLBACK 1402
++#define ER_NONEXISTING_PROC_GRANT 1403
++#define ER_PROC_AUTO_GRANT_FAIL 1404
++#define ER_PROC_AUTO_REVOKE_FAIL 1405
++#define ER_DATA_TOO_LONG 1406
++#define ER_SP_BAD_SQLSTATE 1407
++#define ER_STARTUP 1408
++#define ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR 1409
++#define ER_CANT_CREATE_USER_WITH_GRANT 1410
++#define ER_WRONG_VALUE_FOR_TYPE 1411
++#define ER_TABLE_DEF_CHANGED 1412
++#define ER_SP_DUP_HANDLER 1413
++#define ER_SP_NOT_VAR_ARG 1414
++#define ER_SP_NO_RETSET 1415 /* no longer in use ?! */
++#define ER_CANT_CREATE_GEOMETRY_OBJECT 1416
++#define ER_FAILED_ROUTINE_BREAK_BINLOG 1417 /* no longer in use ?! */
++#define ER_BINLOG_UNSAFE_ROUTINE 1418
++#define ER_BINLOG_CREATE_ROUTINE_NEED_SUPER 1419
++#define ER_EXEC_STMT_WITH_OPEN_CURSOR 1420 /* no longer in use ?! */
++#define ER_STMT_HAS_NO_OPEN_CURSOR 1421
++#define ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG 1422
++#define ER_NO_DEFAULT_FOR_VIEW_FIELD 1423
++#define ER_SP_NO_RECURSION 1424
++#define ER_TOO_BIG_SCALE 1425
++#define ER_TOO_BIG_PRECISION 1426
++#define ER_M_BIGGER_THAN_D 1427
++#define ER_WRONG_LOCK_OF_SYSTEM_TABLE 1428
++#define ER_CONNECT_TO_FOREIGN_DATA_SOURCE 1429
++#define ER_QUERY_ON_FOREIGN_DATA_SOURCE 1430
++#define ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST 1431
++#define ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE 1432
++#define ER_FOREIGN_DATA_STRING_INVALID 1433
++#define ER_CANT_CREATE_FEDERATED_TABLE 1434
++#define ER_TRG_IN_WRONG_SCHEMA 1435
++#define ER_STACK_OVERRUN_NEED_MORE 1436
++#define ER_TOO_LONG_BODY 1437
++#define ER_WARN_CANT_DROP_DEFAULT_KEYCACHE 1438 /* no longer in use ?! */
++#define ER_TOO_BIG_DISPLAYWIDTH 1439
++#define ER_XAER_DUPID 1440
++#define ER_DATETIME_FUNCTION_OVERFLOW 1441
++#define ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG 1442
++#define ER_VIEW_PREVENT_UPDATE 1443
++#define ER_PS_NO_RECURSION 1444
++#define ER_SP_CANT_SET_AUTOCOMMIT 1445 /* no longer in use ?! */
++#define ER_MALFORMED_DEFINER 1446 /* no longer in use ?! */
++#define ER_VIEW_FRM_NO_USER 1447
++#define ER_VIEW_OTHER_USER 1448 /* no longer in use ?! */
++#define ER_NO_SUCH_USER 1449
++#define ER_FORBID_SCHEMA_CHANGE 1450
++#define ER_ROW_IS_REFERENCED_2 1451
++#define ER_NO_REFERENCED_ROW_2 1452
++#define ER_SP_BAD_VAR_SHADOW 1453
++#define ER_TRG_NO_DEFINER 1454
++#define ER_OLD_FILE_FORMAT 1455
++#define ER_SP_RECURSION_LIMIT 1456
++#define ER_SP_PROC_TABLE_CORRUPT 1457
++#define ER_SP_WRONG_NAME 1458
++#define ER_TABLE_NEEDS_UPGRADE 1459
++#define ER_SP_NO_AGGREGATE 1460 /* no longer in use ?! */
++#define ER_MAX_PREPARED_STMT_COUNT_REACHED 1461
++#define ER_VIEW_RECURSIVE 1462
++#define ER_NON_GROUPING_FIELD_USED 1463
++#define ER_TABLE_CANT_HANDLE_SPKEYS 1464
++#define ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA 1465
++#define ER_REMOVED_SPACES 1466
++#define ER_AUTOINC_READ_FAILED 1467
++#define ER_USERNAME 1468
++#define ER_HOSTNAME 1469
++#define ER_WRONG_STRING_LENGTH 1470
++#define ER_NON_INSERTABLE_TABLE 1471
++#define ER_ADMIN_WRONG_MRG_TABLE 1472
++#define ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT 1473
++#define ER_NAME_BECOMES_EMPTY 1474
++#define ER_AMBIGUOUS_FIELD_TERM 1475
++#define ER_FOREIGN_SERVER_EXISTS 1476
++#define ER_FOREIGN_SERVER_DOESNT_EXIST 1477
++#define ER_ILLEGAL_HA_CREATE_OPTION 1478
++#define ER_PARTITION_REQUIRES_VALUES_ERROR 1479
++#define ER_PARTITION_WRONG_VALUES_ERROR 1480
++#define ER_PARTITION_MAXVALUE_ERROR 1481
++#define ER_PARTITION_SUBPARTITION_ERROR 1482 /* no longer in use ?! */
++#define ER_PARTITION_SUBPART_MIX_ERROR 1483 /* no longer in use ?! */
++#define ER_PARTITION_WRONG_NO_PART_ERROR 1484
++#define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485
++#define ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR 1486
++#define ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487 /* no longer in use ?! */
++#define ER_FIELD_NOT_FOUND_PART_ERROR 1488
++#define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489 /* no longer in use ?! */
++#define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490
++#define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491
++#define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492
++#define ER_RANGE_NOT_INCREASING_ERROR 1493
++#define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494 /* no longer in use ?! */
++#define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495
++#define ER_PARTITION_ENTRY_ERROR 1496
++#define ER_MIX_HANDLER_ERROR 1497
++#define ER_PARTITION_NOT_DEFINED_ERROR 1498
++#define ER_TOO_MANY_PARTITIONS_ERROR 1499
++#define ER_SUBPARTITION_ERROR 1500
++#define ER_CANT_CREATE_HANDLER_FILE 1501
++#define ER_BLOB_FIELD_IN_PART_FUNC_ERROR 1502
++#define ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF 1503
++#define ER_NO_PARTS_ERROR 1504
++#define ER_PARTITION_MGMT_ON_NONPARTITIONED 1505
++#define ER_FOREIGN_KEY_ON_PARTITIONED 1506
++#define ER_DROP_PARTITION_NON_EXISTENT 1507
++#define ER_DROP_LAST_PARTITION 1508
++#define ER_COALESCE_ONLY_ON_HASH_PARTITION 1509
++#define ER_REORG_HASH_ONLY_ON_SAME_NO 1510
++#define ER_REORG_NO_PARAM_ERROR 1511
++#define ER_ONLY_ON_RANGE_LIST_PARTITION 1512
++#define ER_ADD_PARTITION_SUBPART_ERROR 1513
++#define ER_ADD_PARTITION_NO_NEW_PARTITION 1514
++#define ER_COALESCE_PARTITION_NO_PARTITION 1515
++#define ER_REORG_PARTITION_NOT_EXIST 1516
++#define ER_SAME_NAME_PARTITION 1517
++#define ER_NO_BINLOG_ERROR 1518
++#define ER_CONSECUTIVE_REORG_PARTITIONS 1519
++#define ER_REORG_OUTSIDE_RANGE 1520
++#define ER_PARTITION_FUNCTION_FAILURE 1521
++#define ER_PART_STATE_ERROR 1522 /* no longer in use ?! */
++#define ER_LIMITED_PART_RANGE 1523
++#define ER_PLUGIN_IS_NOT_LOADED 1524
++#define ER_WRONG_VALUE 1525
++#define ER_NO_PARTITION_FOR_GIVEN_VALUE 1526
++#define ER_FILEGROUP_OPTION_ONLY_ONCE 1527
++#define ER_CREATE_FILEGROUP_FAILED 1528
++#define ER_DROP_FILEGROUP_FAILED 1529
++#define ER_TABLESPACE_AUTO_EXTEND_ERROR 1530
++#define ER_WRONG_SIZE_NUMBER 1531
++#define ER_SIZE_OVERFLOW_ERROR 1532
++#define ER_ALTER_FILEGROUP_FAILED 1533
++#define ER_BINLOG_ROW_LOGGING_FAILED 1534
++#define ER_BINLOG_ROW_WRONG_TABLE_DEF 1535 /* no longer in use ?! */
++#define ER_BINLOG_ROW_RBR_TO_SBR 1536 /* no longer in use ?! */
++#define ER_EVENT_ALREADY_EXISTS 1537
++#define ER_EVENT_STORE_FAILED 1538
++#define ER_EVENT_DOES_NOT_EXIST 1539
++#define ER_EVENT_CANT_ALTER 1540 /* no longer in use ?! */
++#define ER_EVENT_DROP_FAILED 1541 /* no longer in use ?! */
++#define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542
++#define ER_EVENT_ENDS_BEFORE_STARTS 1543
++#define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544
++#define ER_EVENT_OPEN_TABLE_FAILED 1545
++#define ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546 /* no longer in use ?! */
++#define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547
++#define ER_CANNOT_LOAD_FROM_TABLE 1548
++#define ER_EVENT_CANNOT_DELETE 1549 /* no longer in use ?! */
++#define ER_EVENT_COMPILE_ERROR 1550 /* no longer in use ?! */
++#define ER_EVENT_SAME_NAME 1551
++#define ER_EVENT_DATA_TOO_LONG 1552
++#define ER_DROP_INDEX_FK 1553
++#define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554 /* no longer in use ?! */
++#define ER_CANT_WRITE_LOCK_LOG_TABLE 1555 /* no longer in use ?! */
++#define ER_CANT_LOCK_LOG_TABLE 1556
++#define ER_FOREIGN_DUPLICATE_KEY 1557
++#define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558
++#define ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR 1559
++#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT 1560
++#define ER_NDB_CANT_SWITCH_BINLOG_FORMAT 1561 /* no longer in use ?! */
++#define ER_PARTITION_NO_TEMPORARY 1562
++#define ER_PARTITION_CONST_DOMAIN_ERROR 1563
++#define ER_PARTITION_FUNCTION_IS_NOT_ALLOWED 1564
++#define ER_DDL_LOG_ERROR 1565
++#define ER_NULL_IN_VALUES_LESS_THAN 1566
++#define ER_WRONG_PARTITION_NAME 1567
++#define ER_CANT_CHANGE_TX_ISOLATION 1568 /* no longer in use ?! */
++#define ER_DUP_ENTRY_AUTOINCREMENT_CASE 1569
++#define ER_EVENT_MODIFY_QUEUE_ERROR 1570 /* no longer in use ?! */
++#define ER_EVENT_SET_VAR_ERROR 1571
++#define ER_PARTITION_MERGE_ERROR 1572
++#define ER_CANT_ACTIVATE_LOG 1573 /* no longer in use ?! */
++#define ER_RBR_NOT_AVAILABLE 1574 /* no longer in use ?! */
++#define ER_BASE64_DECODE_ERROR 1575
++#define ER_EVENT_RECURSION_FORBIDDEN 1576
++#define ER_EVENTS_DB_ERROR 1577
++#define ER_ONLY_INTEGERS_ALLOWED 1578
++#define ER_UNSUPORTED_LOG_ENGINE 1579
++#define ER_BAD_LOG_STATEMENT 1580
++#define ER_CANT_RENAME_LOG_TABLE 1581
++#define ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 1582
++#define ER_WRONG_PARAMETERS_TO_NATIVE_FCT 1583
++#define ER_WRONG_PARAMETERS_TO_STORED_FCT 1584
++#define ER_NATIVE_FCT_NAME_COLLISION 1585
++#define ER_DUP_ENTRY_WITH_KEY_NAME 1586
++#define ER_BINLOG_PURGE_EMFILE 1587
++#define ER_EVENT_CANNOT_CREATE_IN_THE_PAST 1588
++#define ER_EVENT_CANNOT_ALTER_IN_THE_PAST 1589
++#define ER_SLAVE_INCIDENT 1590
++#define ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT 1591
++#define ER_BINLOG_UNSAFE_STATEMENT 1592
++#define ER_SLAVE_FATAL_ERROR 1593
++#define ER_SLAVE_RELAY_LOG_READ_FAILURE 1594
++#define ER_SLAVE_RELAY_LOG_WRITE_FAILURE 1595
++#define ER_SLAVE_CREATE_EVENT_FAILURE 1596
++#define ER_SLAVE_MASTER_COM_FAILURE 1597
++#define ER_BINLOG_LOGGING_IMPOSSIBLE 1598
++#define ER_VIEW_NO_CREATION_CTX 1599
++#define ER_VIEW_INVALID_CREATION_CTX 1600
++#define ER_SR_INVALID_CREATION_CTX 1601
++#define ER_TRG_CORRUPTED_FILE 1602
++#define ER_TRG_NO_CREATION_CTX 1603
++#define ER_TRG_INVALID_CREATION_CTX 1604
++#define ER_EVENT_INVALID_CREATION_CTX 1605
++#define ER_TRG_CANT_OPEN_TABLE 1606
++#define ER_CANT_CREATE_SROUTINE 1607
++#define ER_NEVER_USED 1608 /* no longer in use ?! */
++#define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609
++#define ER_SLAVE_CORRUPT_EVENT 1610
++#define ER_LOAD_DATA_INVALID_COLUMN 1611
++#define ER_LOG_PURGE_NO_FILE 1612
++#define ER_XA_RBTIMEOUT 1613
++#define ER_XA_RBDEADLOCK 1614
++#define ER_NEED_REPREPARE 1615
++#define ER_DELAYED_NOT_SUPPORTED 1616
++#define WARN_NO_MASTER_INFO 1617
++#define WARN_OPTION_IGNORED 1618
++#define WARN_PLUGIN_DELETE_BUILTIN 1619
++#define WARN_PLUGIN_BUSY 1620
++#define ER_VARIABLE_IS_READONLY 1621
++#define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622 /* no longer in use ?! */
++#define ER_SLAVE_HEARTBEAT_FAILURE 1623
++#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624
++#define ER_NDB_REPLICATION_SCHEMA_ERROR 1625 /* no longer in use ?! */
++#define ER_CONFLICT_FN_PARSE_ERROR 1626 /* no longer in use ?! */
++#define ER_EXCEPTIONS_WRITE_ERROR 1627 /* no longer in use ?! */
++#define ER_TOO_LONG_TABLE_COMMENT 1628
++#define ER_TOO_LONG_FIELD_COMMENT 1629
++#define ER_FUNC_INEXISTENT_NAME_COLLISION 1630
++#define ER_DATABASE_NAME 1631
++#define ER_TABLE_NAME 1632
++#define ER_PARTITION_NAME 1633
++#define ER_SUBPARTITION_NAME 1634
++#define ER_TEMPORARY_NAME 1635
++#define ER_RENAMED_NAME 1636
++#define ER_TOO_MANY_CONCURRENT_TRXS 1637
++#define WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED 1638
++#define ER_DEBUG_SYNC_TIMEOUT 1639
++#define ER_DEBUG_SYNC_HIT_LIMIT 1640
++#define ER_DUP_SIGNAL_SET 1641
++#define ER_SIGNAL_WARN 1642
++#define ER_SIGNAL_NOT_FOUND 1643
++#define ER_SIGNAL_EXCEPTION 1644
++#define ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 1645
++#define ER_SIGNAL_BAD_CONDITION_TYPE 1646
++#define WARN_COND_ITEM_TRUNCATED 1647
++#define ER_COND_ITEM_TOO_LONG 1648
++#define ER_UNKNOWN_LOCALE 1649
++#define ER_SLAVE_IGNORE_SERVER_IDS 1650
++#define ER_QUERY_CACHE_DISABLED 1651
++#define ER_SAME_NAME_PARTITION_FIELD 1652
++#define ER_PARTITION_COLUMN_LIST_ERROR 1653
++#define ER_WRONG_TYPE_COLUMN_VALUE_ERROR 1654
++#define ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR 1655
++#define ER_MAXVALUE_IN_VALUES_IN 1656
++#define ER_TOO_MANY_VALUES_ERROR 1657
++#define ER_ROW_SINGLE_PARTITION_FIELD_ERROR 1658
++#define ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD 1659
++#define ER_PARTITION_FIELDS_TOO_LONG 1660
++#define ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE 1661
++#define ER_BINLOG_ROW_MODE_AND_STMT_ENGINE 1662
++#define ER_BINLOG_UNSAFE_AND_STMT_ENGINE 1663
++#define ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE 1664
++#define ER_BINLOG_STMT_MODE_AND_ROW_ENGINE 1665
++#define ER_BINLOG_ROW_INJECTION_AND_STMT_MODE 1666
++#define ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1667
++#define ER_BINLOG_UNSAFE_LIMIT 1668
++#define ER_BINLOG_UNSAFE_INSERT_DELAYED 1669
++#define ER_BINLOG_UNSAFE_SYSTEM_TABLE 1670
++#define ER_BINLOG_UNSAFE_AUTOINC_COLUMNS 1671
++#define ER_BINLOG_UNSAFE_UDF 1672
++#define ER_BINLOG_UNSAFE_SYSTEM_VARIABLE 1673
++#define ER_BINLOG_UNSAFE_SYSTEM_FUNCTION 1674
++#define ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS 1675
++#define ER_MESSAGE_AND_STATEMENT 1676
++#define ER_SLAVE_CONVERSION_FAILED 1677
++#define ER_SLAVE_CANT_CREATE_CONVERSION 1678
++#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT 1679
++#define ER_PATH_LENGTH 1680
++#define ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT 1681
++#define ER_WRONG_NATIVE_TABLE_STRUCTURE 1682
++#define ER_WRONG_PERFSCHEMA_USAGE 1683
++#define ER_WARN_I_S_SKIPPED_TABLE 1684
++#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT 1685
++#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT 1686
++#define ER_SPATIAL_MUST_HAVE_GEOM_COL 1687 /* no longer in use ?! */
++#define ER_TOO_LONG_INDEX_COMMENT 1688
++#define ER_LOCK_ABORTED 1689
++#define ER_DATA_OUT_OF_RANGE 1690 /* no longer in use ?! */
++#define ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691
++#define ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1692
++#define ER_BINLOG_UNSAFE_MIXED_STATEMENT 1693
++#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN 1694
++#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN 1695
++#define ER_FAILED_READ_FROM_PAR_FILE 1696
++#define ER_VALUES_IS_NOT_INT_TYPE_ERROR 1697
++#define ER_ACCESS_DENIED_NO_PASSWORD_ERROR 1698
++#define ER_SET_PASSWORD_AUTH_PLUGIN 1699
++#define ER_GRANT_PLUGIN_USER_EXISTS 1700
++#define ER_TRUNCATE_ILLEGAL_FK 1701
++#define ER_PLUGIN_IS_PERMANENT 1702
++#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN 1703
++#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX 1704
++#define ER_STMT_CACHE_FULL 1705
++#define ER_MULTI_UPDATE_KEY_CONFLICT 1706
++#define ER_TABLE_NEEDS_REBUILD 1707
++#define WARN_OPTION_BELOW_LIMIT 1708
++#define ER_INDEX_COLUMN_TOO_LONG 1709
++#define ER_ERROR_IN_TRIGGER_BODY 1710
++#define ER_ERROR_IN_UNKNOWN_TRIGGER_BODY 1711
++#define ER_INDEX_CORRUPT 1712
++#define ER_UNDO_RECORD_TOO_BIG 1713
++#define ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT 1714
++#define ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE 1715
++#define ER_BINLOG_UNSAFE_REPLACE_SELECT 1716
++#define ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT 1717
++#define ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT 1718
++#define ER_BINLOG_UNSAFE_UPDATE_IGNORE 1719
++#define ER_PLUGIN_NO_UNINSTALL 1720 /* no longer in use ?! */
++#define ER_PLUGIN_NO_INSTALL 1721 /* no longer in use ?! */
++#define ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT 1722
++#define ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC 1723
++#define ER_BINLOG_UNSAFE_INSERT_TWO_KEYS 1724
++#define ER_TABLE_IN_FK_CHECK 1725
++#define ER_UNUSED_1 1726 /* not in use ?! */
++#define ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST 1727
++#define ER_LAST_MYSQL_ERROR_MESSAGE 1728
++
++/* MariaDB only errors */
++#define ER_VCOL_BASED_ON_VCOL 1900
++#define ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED 1901
++#define ER_DATA_CONVERSION_ERROR_FOR_VIRTUAL_COLUMN 1902
++#define ER_PRIMARY_KEY_BASED_ON_VIRTUAL_COLUMN 1903
++#define ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN 1904
++#define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN 1905
++#define ER_WARNING_NON_DEFAULT_VALUE_FOR_VIRTUAL_COLUMN 1906
++#define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN 1907
++#define ER_CONST_EXPR_IN_VCOL 1908
++#define ER_ROW_EXPR_FOR_VCOL 1909
++#define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS 1910
++#define ER_UNKNOWN_OPTION 1911
++#define ER_BAD_OPTION_VALUE 1912
++#define ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE 1913
++#define ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE 1914
++#define ER_CANT_DO_ONLINE 1915
++#define ER_DATA_OVERFLOW 1916
++#define ER_DATA_TRUNCATED 1917
++#define ER_BAD_DATA 1918
++#define ER_DYN_COL_WRONG_FORMAT 1919
++#define ER_DYN_COL_IMPLEMENTATION_LIMIT 1920
++#define ER_DYN_COL_DATA 1921
++#define ER_DYN_COL_WRONG_CHARSET 1922
++#define ER_ILLEGAL_SUBQUERY_OPTIMIZER_SWITCHES 1923
++#define ER_QUERY_CACHE_IS_DISABLED 1924
++#define ER_QUERY_CACHE_IS_GLOBALY_DISABLED 1925
++#define ER_VIEW_ORDERBY_IGNORED 1926
++#define ER_CONNECTION_KILLED 1927
++#define ER_INTERNAL_ERROR 1928
++#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SKIP_REPLICATION 1929
++#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SKIP_REPLICATION 1930
++#define ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT 1931
++#define ER_NO_SUCH_TABLE_IN_ENGINE 1932
++#define ER_GEOMETRY_SRID_MISMATCH 1933
++#define ER_NO_SUCH_SPATIAL_REF_ID 1934
+
+=== renamed directory 'libmysql' => 'libmariadb'
+=== modified file 'libmariadb/CMakeLists.txt'
+--- mariadb/libmysql/CMakeLists.txt	2012-11-29 00:58:44 +0000
++++ mariadb/libmariadb/CMakeLists.txt	2013-03-14 21:01:43 +0000
+@@ -1,9 +1,13 @@
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 
+                     ${ZLIB_INC}
+-                    ${CMAKE_SOURCE_DIR}/libmysql)
++                    ${CMAKE_SOURCE_DIR}/libmariadb)
+ 					
+ IF(OPENSSL_FOUND)
+  INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
++ SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES})
++ IF(OPENSSL_CRYPTO_LIBRARIES)
++   SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES})
++ ENDIF()
+ ENDIF()
+ 
+ 
+@@ -11,7 +15,7 @@
+ ADD_DEFINITIONS(-D HAVE_COMPRESS)
+ ADD_DEFINITIONS(-D THREAD)
+ 
+-SET(LIBMYSQL_SOURCES 
++SET(LIBMARIADB_SOURCES 
+ array.c 
+ bchange.c 
+ bmove.c 
+@@ -30,7 +34,7 @@
+ get_password.c
+ int2str.c
+ is_prefix.c
+-libmysql.c
++libmariadb.c
+ list.c
+ llstr.c
+ longlong2str.c 
+@@ -94,11 +98,17 @@
+ my_stmt_codec.c
+ client_plugin.c
+ my_auth.c
+-my_secure.c
+-libmysql_exports.def
++ma_secure.c
++libmariadb_exports.def
+ )
+ 
+-
++IF(WITH_SQLITE)
++  SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES}
++                         ${CMAKE_SOURCE_DIR}/plugins/sqlite/sqlite3.c
++                         ${CMAKE_SOURCE_DIR}/plugins/sqlite/sqlite_client_plugin.c)
++  INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugins/sqlite)
++  ADD_DEFINITIONS(-DSQLITE_ENABLE_COLUMN_METADATA=1)
++ENDIF()
+ 
+ IF(ZLIB_FOUND)
+   INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+@@ -122,25 +132,24 @@
+     ../zlib/uncompr.c
+     ../zlib/zutil.c
+   )
+-  SET(LIBMYSQL_SOURCES ${LIBMYSQL_SOURCES} ${ZLIB_SOURCES})
++SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} ${ZLIB_SOURCES})
+   INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib)
+ ENDIF()
+ 
+ 
+-ADD_LIBRARY(mariadbclient STATIC ${LIBMYSQL_SOURCES})
++ADD_LIBRARY(mariadbclient STATIC ${LIBMARIADB_SOURCES})
+ TARGET_LINK_LIBRARIES(mariadbclient ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
+ IF(OPENSSL_FOUND)
+-  TARGET_LINK_LIBRARIES(mariadbclient ${OPENSSL_LIBRARIES})
++  TARGET_LINK_LIBRARIES(mariadbclient ${SSL_LIBRARIES})
+ ENDIF()
+ 
+-ADD_LIBRARY(libmariadb SHARED ${LIBMYSQL_SOURCES})
++ADD_LIBRARY(libmariadb SHARED ${LIBMARIADB_SOURCES})
+ TARGET_LINK_LIBRARIES(libmariadb ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
+ 
+ IF(OPENSSL_FOUND)
+-  TARGET_LINK_LIBRARIES(libmariadb ${OPENSSL_LIBRARIES})
++  TARGET_LINK_LIBRARIES(libmariadb ${SSL_LIBRARIES})
+ ENDIF()
+ 
+-
+ IF(WIN32)
+   TARGET_LINK_LIBRARIES(libmariadb ws2_32)
+   TARGET_LINK_LIBRARIES(mariadbclient ws2_32)
+@@ -164,16 +173,52 @@
+ # Installation
+ #
+ 
++# There are still several projects which don't make use
++# of the config program. To make sure these programs can
++# use mariadb client library we provide libmysql symlinks
++IF(NOT WIN32 AND WITH_MYSQLCOMPAT)
++  ADD_CUSTOM_COMMAND(OUTPUT "libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                            "libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                            "libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                            "libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX}"
++                     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}
++                     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libmariadb${CMAKE_SHARED_LIBRARY_SUFFIX} libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}
++                     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX}
++                     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libmariadb${CMAKE_SHARED_LIBRARY_SUFFIX} libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX}
++                     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}
++                     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libmariadb${CMAKE_SHARED_LIBRARY_SUFFIX} libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}
++                     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX}
++                     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libmariadb${CMAKE_STATIC_LIBRARY_SUFFIX} libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX}
++                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libmariadb
++                    DEPENDS libmariadb mariadbclient)
++
++ADD_CUSTOM_TARGET(LIBMYSQL_SYMLINKS
++                  ALL
++                  DEPENDS "libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                          "libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                          "libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                          "libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX}"
++                  VERBATIM)
++ENDIF()
++
++
+ INSTALL(TARGETS
+           libmariadb mariadbclient
+-          RUNTIME DESTINATION "lib"
+-          LIBRARY DESTINATION "lib"
+-          ARCHIVE DESTINATION "lib")
++          RUNTIME DESTINATION "lib/mariadb"
++          LIBRARY DESTINATION "lib/mariadb"
++          ARCHIVE DESTINATION "lib/mariadb")
++IF(NOT WIN32 AND WITH_MYSQLCOMPAT)
++  INSTALL(FILES "libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                "libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                "libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX}"
++                "libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX}"
++                DESTINATION lib/mariadb)
++ENDIF()
+ 
+-INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include
+-        DESTINATION mariadbclient)
++INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/
++        DESTINATION include/mariadb)
+ INSTALL(FILES 
+    ${CMAKE_BINARY_DIR}/include/my_config.h
+    ${CMAKE_BINARY_DIR}/include/mysql_version.h
+-   DESTINATION mariadbclient/include
++   DESTINATION include/mariadb
+ )
+
+=== modified file 'libmariadb/array.c'
+--- mariadb/libmysql/array.c	2012-11-14 17:43:45 +0000
++++ mariadb/libmariadb/array.c	2013-03-14 21:01:43 +0000
+@@ -75,7 +75,7 @@
+ 
+ 	/* Alloc room for one element */
+ 
+-byte *alloc_dynamic(DYNAMIC_ARRAY *array)
++unsigned char *alloc_dynamic(DYNAMIC_ARRAY *array)
+ {
+   if (array->elements == array->max_element)
+   {
+@@ -94,7 +94,7 @@
+ 
+ 	/* remove last element from array and return it */
+ 
+-byte *pop_dynamic(DYNAMIC_ARRAY *array)
++unsigned char *pop_dynamic(DYNAMIC_ARRAY *array)
+ {
+   if (array->elements)
+     return array->buffer+(--array->elements * array->size_of_element);
+
+=== modified file 'libmariadb/client_plugin.c'
+--- mariadb/libmysql/client_plugin.c	2012-11-27 08:57:10 +0000
++++ mariadb/libmariadb/client_plugin.c	2013-03-14 21:01:43 +0000
+@@ -18,7 +18,7 @@
+ /**
+   @file
+   
+-  Support code for the client side (libmysql) plugins
++  Support code for the client side (libmariadb) plugins
+ 
+   Client plugins are somewhat different from server plugins, they are simpler.
+ 
+@@ -60,7 +60,7 @@
+ 
+ static uint plugin_version[MYSQL_CLIENT_MAX_PLUGINS]=
+ {
+-  0, /* these two are taken by Connector/C */
++  MYSQL_CLIENT_DB_PLUGIN_INTERFACE_VERSION, /* these two are taken by Connector/C */
+   0, /* these two are taken by Connector/C */
+   MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION
+ };
+@@ -230,7 +230,7 @@
+   my_free(free_env, MYF(0));
+ }
+ 
+-/********** extern functions to be used by libmysql *********************/
++/********** extern functions to be used by libmariadb *********************/
+ 
+ /**
+   Initializes the client plugin layer.
+@@ -264,7 +264,6 @@
+ 
+   for (builtin= mysql_client_builtins; *builtin; builtin++)
+     add_plugin(&mysql, *builtin, 0, 0, unused);
+-
+   pthread_mutex_unlock(&LOCK_load_client_plugin);
+ 
+   load_env_plugins(&mysql);
+
+=== modified file 'libmariadb/dbug.c'
+--- mariadb/libmysql/dbug.c	2012-11-14 17:43:45 +0000
++++ mariadb/libmariadb/dbug.c	2013-03-14 21:01:43 +0000
+@@ -707,8 +707,8 @@
+     int save_errno=errno;
+     if (!init_done)
+       _db_push_ (_DBUG_START_CONDITION_);
+-    state=code_state();
+-
++    if(!(state=code_state()))
++      return;
+     *_sfunc_ = state->func;
+     *_sfile_ = state->file;
+     state->func =(char*)  _func_;
+
+=== modified file 'libmariadb/errmsg.c'
+--- mariadb/libmysql/errmsg.c	2012-11-26 07:32:41 +0000
++++ mariadb/libmariadb/errmsg.c	2013-03-14 21:01:43 +0000
+@@ -106,17 +106,17 @@
+ /* 2023 */  "",
+ /* 2024 */  "",
+ /* 2025 */  "",
+-/* 2026 */  "SSL connection error",
++/* 2026 */  "SSL connection error: %100s",
+ /* 2027 */  "received malformed packet",
+ /* 2028 */  "",
+ /* 2029 */  "",
+-/* 2030 */  "",
+-/* 2031 */  "",
++/* 2030 */  "Statement is not prepared",
++/* 2031 */  "No data supplied for parameters in prepared statement",
+ /* 2032 */  "",
+ /* 2033 */  "",
+ /* 2034 */  "",
+ /* 2035 */  "",
+-/* 2036 */  "",
++/* 2036 */  "Buffer type is not supported",
+ /* 2037 */  "",
+ /* 2038 */  "",
+ /* 2039 */  "",
+@@ -132,14 +132,15 @@
+ /* 2049 */  "",
+ /* 2050 */  "",
+ /* 2051 */  "",
+-/* 2052 */  "",
++/* 2052 */  "Prepared statement contains no metadata",
+ /* 2053 */  "",
+-/* 2054 */  "",
++/* 2054 */  "This feature is not implemented or disabled",
+ /* 2055 */  "",
+ /* 2056 */  "",
+ /* 2057 */  "The number of parameters in bound buffers differs from number of columns in resultset",
+-/* 2058 */  "Can't connect twice. Already connected",
+-/* 2059 */  "Plugin %s could not be loaded: %s",
++/* 2058 */  "Plugin %s could not be loaded: %s",
++/* 2059 */  "Can't connect twice. Already connected",
++/* 2060 */  "Plugin doesn't support this function",
+             ""
+ };
+ #endif
+
+=== renamed file 'libmysql/libmysql.c' => 'libmariadb/libmariadb.c'
+--- mariadb/libmysql/libmysql.c	2012-11-27 08:57:10 +0000
++++ mariadb/libmariadb/libmariadb.c	2013-03-14 21:01:43 +0000
+@@ -1,5 +1,5 @@
+ /************************************************************************************
+-    Copyright (C) 2000, 2011 MySQL AB & MySQL Finland AB & TCX DataKonsult AB,
++    Copyright (C) 2000, 2012 MySQL AB & MySQL Finland AB & TCX DataKonsult AB,
+                  Monty Program AB
+    
+    This library is free software; you can redistribute it and/or
+@@ -61,7 +61,7 @@
+ #include <sha1.h>
+ #include <violite.h>
+ #ifdef HAVE_OPENSSL
+-#include <my_secure.h>
++#include <ma_secure.h>
+ #endif
+ 
+ static my_bool mysql_client_init=0;
+@@ -72,6 +72,17 @@
+ extern const CHARSET_INFO * mysql_find_charset_name(const char * const name);
+ extern int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
+                            const char *data_plugin, const char *db);
++
++/* prepare statement methods from my_stmt.c */
++extern my_bool mthd_supported_buffer_type(enum enum_field_types type);
++extern my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt);
++extern my_bool mthd_stmt_get_param_metadata(MYSQL_STMT *stmt);
++extern my_bool mthd_stmt_get_result_metadata(MYSQL_STMT *stmt);
++extern int mthd_stmt_fetch_row(MYSQL_STMT *stmt, unsigned char **row);
++extern int mthd_stmt_fetch_to_bind(MYSQL_STMT *stmt, unsigned char *row);
++extern int mthd_stmt_read_all_rows(MYSQL_STMT *stmt);
++extern void mthd_stmt_flush_unbuffered(MYSQL_STMT *stmt);
++
+ uint mysql_port=0;
+ my_string mysql_unix_port=0;
+ 
+@@ -81,6 +92,8 @@
+ #define CONNECT_TIMEOUT 0
+ #endif
+ 
++struct st_mysql_methods MARIADB_DEFAULT_METHODS;
++
+ #if defined(MSDOS) || defined(_WIN32)
+ // socket_errno is defined in my_global.h for all platforms
+ #define perror(A)
+@@ -94,10 +107,6 @@
+ #define native_password_plugin_name "mysql_native_password"
+ const char     *unknown_sqlstate= "HY000";
+ 
+-MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields,
+-                       uint field_count);
+-static int read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row,
+-                        ulong *lengths);
+ static void end_server(MYSQL *mysql);
+ static void mysql_close_memory(MYSQL *mysql);
+ void read_user_name(char *name);
+@@ -125,6 +134,7 @@
+ #endif
+ 
+ 
++
+ /****************************************************************************
+ * A modified version of connect().  connect2() allows you to specify
+ * a timeout value, in seconds, that we should wait until we
+@@ -523,14 +533,14 @@
+ 
+ 
+ int
+-simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
+-	       size_t length, my_bool skipp_check)
++mthd_my_send_cmd(MYSQL *mysql,enum enum_server_command command, const char *arg,
++	       size_t length, my_bool skipp_check, void *opt_arg)
+ {
+   NET *net= &mysql->net;
+   int result= -1;
+   init_sigpipe_variables
+ 
+-  DBUG_ENTER("simple_command");
++  DBUG_ENTER("mthd_my_send_command");
+ 
+   DBUG_PRINT("info", ("server_command: %d  packet_size: %u", command, length));
+ 
+@@ -591,6 +601,12 @@
+   DBUG_RETURN(result);
+ }
+ 
++int
++simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
++	       size_t length, my_bool skipp_check, void *opt_arg)
++{
++  return mysql->methods->db_command(mysql, command, arg, length, skipp_check, opt_arg);
++}
+ 
+ static void free_old_query(MYSQL *mysql)
+ {
+@@ -711,13 +727,13 @@
+     DBUG_PUSH(env);
+ #if !defined(_WINVER) && !defined(WINVER)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list