From e2b3b1f398994861f4d719a87fa3c7f40bc24786 Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Tue, 17 Jan 2006 12:55:30 +0100 Subject: [PATCH 1/3] Increase the version number to 4.1.18 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 9afd2034796..b3daaa5731d 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 4.1.17) +AM_INIT_AUTOMAKE(mysql, 4.1.18) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -16,7 +16,7 @@ SHARED_LIB_VERSION=14:0:0 # ndb version NDB_VERSION_MAJOR=4 NDB_VERSION_MINOR=1 -NDB_VERSION_BUILD=17 +NDB_VERSION_BUILD=18 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From f84b301bd19c39b73ef1e89e8485134f8b1fe124 Mon Sep 17 00:00:00 2001 From: "svoj@april.(none)" <> Date: Tue, 17 Jan 2006 18:51:08 +0400 Subject: [PATCH 2/3] BUG#3074: Unversioned symbols in shared library libmysqlclient versioning when linked with GNU ld. --- .bzrignore | 1 + configure.in | 11 ++++++++++- libmysql/Makefile.shared | 2 +- libmysql/libmysql.ver.in | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 libmysql/libmysql.ver.in diff --git a/.bzrignore b/.bzrignore index d8be10eacdb..414a40ef1eb 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1057,3 +1057,4 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +libmysql/libmysql.ver diff --git a/configure.in b/configure.in index 9afd2034796..6ac6f77b318 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,8 @@ AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 DOT_FRM_VERSION=6 # See the libtool docs for information on how to do shared lib versions. -SHARED_LIB_VERSION=14:0:0 +SHARED_LIB_MAJOR_VERSION=14 +SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=4 @@ -68,6 +69,7 @@ AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION], AC_SUBST(DOT_FRM_VERSION) AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION], [Version of .frm files]) +AC_SUBST(SHARED_LIB_MAJOR_VERSION) AC_SUBST(SHARED_LIB_VERSION) AC_SUBST(AVAILABLE_LANGUAGES) AC_SUBST(AVAILABLE_LANGUAGES_ERRORS) @@ -431,6 +433,13 @@ then fi fi +# libmysqlclient versioning when linked with GNU ld. +if $LD --version 2>/dev/null|grep -q GNU; then + LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libmysql/libmysql.ver" + AC_CONFIG_FILES(libmysql/libmysql.ver) +fi +AC_SUBST(LD_VERSION_SCRIPT) + # Avoid bug in fcntl on some versions of linux AC_MSG_CHECKING("if we should use 'skip-locking' as default for $target_os") # Any wariation of Linux diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared index bb4d252f385..3f72049bf43 100644 --- a/libmysql/Makefile.shared +++ b/libmysql/Makefile.shared @@ -75,7 +75,7 @@ mysysobjects2 = my_lib.lo mysysobjects = $(mysysobjects1) $(mysysobjects2) target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \ $(sql_cmn_objects) $(vio_objects) $(sqlobjects) -target_ldflags = -version-info @SHARED_LIB_VERSION@ +target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@ vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo CLEANFILES = $(target_libadd) $(SHLIBOBJS) \ $(target) diff --git a/libmysql/libmysql.ver.in b/libmysql/libmysql.ver.in new file mode 100644 index 00000000000..20eb0fd41bb --- /dev/null +++ b/libmysql/libmysql.ver.in @@ -0,0 +1 @@ +libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; From 19fd36e2540be2e807b71fd4350d6893889308e2 Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 17 Jan 2006 23:19:43 +0300 Subject: [PATCH 3/3] A fix and a test case for Bug#16144 "mysql_stmt_attr_get type error": use the right type in mysql_stmt_attr_get --- libmysql/libmysql.c | 2 +- tests/mysql_client_test.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 7c6d140d2ef..921f042922a 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2733,7 +2733,7 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, { switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: - *(unsigned long *) value= stmt->update_max_length; + *(my_bool*) value= stmt->update_max_length; break; default: return TRUE; diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index f0566995262..797a0b1b8d7 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -11753,6 +11753,25 @@ static void test_bug12925() } +/* Bug #16144: mysql_stmt_attr_get type error */ + +static void test_bug16144() +{ + const my_bool flag_orig= (my_bool) 0xde; + my_bool flag= flag_orig; + MYSQL_STMT *stmt; + myheader("test_bug16144"); + + /* Check that attr_get returns correct data on little and big endian CPUs */ + stmt= mysql_stmt_init(mysql); + mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag); + mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag); + DIE_UNLESS(flag == flag_orig); + + mysql_stmt_close(stmt); +} + + /* Read and parse arguments and MySQL options from my.cnf */ @@ -11974,6 +11993,7 @@ static struct my_tests_st my_tests[]= { { "test_bug12001", test_bug12001 }, { "test_bug11718", test_bug11718 }, { "test_bug12925", test_bug12925 }, + { "test_bug16144", test_bug16144 }, { 0, 0 } };