Skip to content

Commit b2a9961

Browse files
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/usr/home/pem/mysql-5.1-new
2 parents c171f8c + ba8d1f1 commit b2a9961

51 files changed

Lines changed: 832 additions & 163 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/ac-macros/yassl.m4

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
1616
AC_MSG_RESULT([using bundled yaSSL])
1717
yassl_dir="extra/yassl"
1818
yassl_libs="-L\$(top_srcdir)/extra/yassl/src -lyassl -L\$(top_srcdir)/extra/yassl/taocrypt/src -ltaocrypt"
19-
yassl_libs_with_path="\$(top_srcdir)/extra/yassl/src/libyassl.a \$(top_srcdir)/extra/yassl/taocrypt/src/libtaocrypt.a"
2019
yassl_includes="-I\$(top_srcdir)/extra/yassl/include"
20+
yassl_libs_with_path="\$(top_srcdir)/extra/yassl/src/libyassl.la \$(top_srcdir)/extra/yassl/taocrypt/src/libtaocrypt.la"
2121
AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
2222
AC_DEFINE([HAVE_YASSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
2323
# System specific checks
2424
yassl_integer_extra_cxxflags=""
2525
case $host_cpu--$CXX_VERSION in
2626
sparc*--*Sun*C++*5.6*)
27-
# Disable inlining when compiling taocrypt/src/integer.cpp
28-
yassl_integer_extra_cxxflags="+d"
29-
AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/integer.cpp])
27+
# Disable inlining when compiling taocrypt/src/
28+
yassl_taocrypt_extra_cxxflags="+d"
29+
AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/])
3030
;;
3131
esac
32-
AC_SUBST([yassl_integer_extra_cxxflags])
32+
AC_SUBST([yassl_taocrypt_extra_cxxflags])
3333
3434
else
3535
yassl_dir=""
3636
AC_MSG_RESULT(no)
3737
fi
3838
AC_SUBST(yassl_libs)
39+
AC_SUBST(yassl_libs_with_path)
3940
AC_SUBST(yassl_includes)
4041
AC_SUBST(yassl_dir)
41-
AC_SUBST(yassl_libs_with_path)
4242
AM_CONDITIONAL([HAVE_YASSL], [ test "with_yassl" = "yes" ])
4343
])

extra/innochecksum.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#define _LARGEFILE_SOURCE
2929
#define _LARGEFILE64_SOURCE
3030

31+
#define _XOPEN_SOURCE /* needed to include getopt.h on some platforms. */
32+
3133
#include <stdio.h>
3234
#include <stdlib.h>
3335
#include <time.h>

extra/yassl/src/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
INCLUDES = -I../include -I../taocrypt/include -I../mySTL
22

3-
noinst_LIBRARIES = libyassl.a
4-
libyassl_a_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
3+
noinst_LTLIBRARIES = libyassl.la
4+
libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
55
handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
66
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
77
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
INCLUDES = -I../include -I../../mySTL
22

3-
noinst_LIBRARIES = libtaoint.a libtaocrypt.a
3+
noinst_LTLIBRARIES = libtaocrypt.la
44

5-
libtaoint_a_SOURCES = integer.cpp
6-
libtaoint_a_CXXFLAGS = @yassl_integer_extra_cxxflags@
7-
8-
libtaocrypt_a_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \
5+
libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \
96
coding.cpp dh.cpp des.cpp dsa.cpp file.cpp hash.cpp \
107
md2.cpp md5.cpp misc.cpp random.cpp ripemd.cpp rsa.cpp sha.cpp \
11-
template_instnt.cpp
12-
libtaocrypt_a_LIBADD = libtaoint_a-integer.o
8+
template_instnt.cpp integer.cpp
9+
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C
1310

1411
EXTRA_DIST = $(wildcard ../include/*.hpp)
15-
AM_CXXFLAGS = -DYASSL_PURE_C

include/my_base.h

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ enum ha_base_keytype {
244244
#define HA_OPTION_CHECKSUM 32
245245
#define HA_OPTION_DELAY_KEY_WRITE 64
246246
#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */
247-
#define HA_OPTION_CREATE_FROM_ENGINE 256
247+
#define HA_OPTION_CREATE_FROM_ENGINE 256
248248
#define HA_OPTION_TEMP_COMPRESS_RECORD ((uint) 16384) /* set by isamchk */
249249
#define HA_OPTION_READ_ONLY_DATA ((uint) 32768) /* Set by isamchk */
250250

@@ -256,15 +256,48 @@ enum ha_base_keytype {
256256
#define HA_CREATE_CHECKSUM 8
257257
#define HA_CREATE_DELAY_KEY_WRITE 64
258258

259-
/* Bits in flag to _status */
259+
/*
260+
The following flags (OR-ed) are passed to handler::info() method.
261+
The method copies misc handler information out of the storage engine
262+
to data structures accessible from MySQL
263+
264+
Same flags are also passed down to mi_status, myrg_status, etc.
265+
*/
260266

261-
#define HA_STATUS_POS 1 /* Return position */
262-
#define HA_STATUS_NO_LOCK 2 /* Don't use external lock */
263-
#define HA_STATUS_TIME 4 /* Return update time */
264-
#define HA_STATUS_CONST 8 /* Return constants values */
265-
#define HA_STATUS_VARIABLE 16
266-
#define HA_STATUS_ERRKEY 32
267-
#define HA_STATUS_AUTO 64
267+
/* this one is not used */
268+
#define HA_STATUS_POS 1
269+
/*
270+
assuming the table keeps shared actual copy of the 'info' and
271+
local, possibly outdated copy, the following flag means that
272+
it should not try to get the actual data (locking the shared structure)
273+
slightly outdated version will suffice
274+
*/
275+
#define HA_STATUS_NO_LOCK 2
276+
/* update the time of the last modification (in handler::update_time) */
277+
#define HA_STATUS_TIME 4
278+
/*
279+
update the 'constant' part of the info:
280+
handler::max_data_file_length, max_index_file_length, create_time
281+
sortkey, ref_length, block_size, data_file_name, index_file_name.
282+
handler::table->s->keys_in_use, keys_for_keyread, rec_per_key
283+
*/
284+
#define HA_STATUS_CONST 8
285+
/*
286+
update the 'variable' part of the info:
287+
handler::records, deleted, data_file_length, index_file_length,
288+
delete_length, check_time, mean_rec_length
289+
*/
290+
#define HA_STATUS_VARIABLE 16
291+
/*
292+
get the information about the key that caused last duplicate value error
293+
update handler::errkey and handler::dupp_ref
294+
see handler::get_dup_key()
295+
*/
296+
#define HA_STATUS_ERRKEY 32
297+
/*
298+
update handler::auto_increment_value
299+
*/
300+
#define HA_STATUS_AUTO 64
268301

269302
/* Errorcodes given by functions */
270303

libmysql/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222

2323
target = libmysqlclient.la
2424
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
25-
LIBS = @CLIENT_LIBS@ @yassl_libs@
25+
LIBS = @CLIENT_LIBS@
2626
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
2727
$(openssl_includes) $(yassl_includes) @ZLIB_INCLUDES@
2828

2929
include $(srcdir)/Makefile.shared
3030

3131
libmysqlclient_la_SOURCES = $(target_sources)
32-
libmysqlclient_la_LIBADD = $(target_libadd)
32+
libmysqlclient_la_LIBADD = $(target_libadd) $(yassl_libs_with_path)
3333
libmysqlclient_la_LDFLAGS = $(target_ldflags)
3434
EXTRA_DIST = Makefile.shared libmysql.def
3535
noinst_HEADERS = client_settings.h

libmysqld/examples/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ link_sources:
3434
DEFS = -DEMBEDDED_LIBRARY
3535
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) \
3636
-I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \
37-
$(openssl_includes)
38-
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@
37+
$(openssl_includes) $(yassl_includes)
38+
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ $(yassl_libs)
3939
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @LIBDL@ $(CXXLDFLAGS)
4040

4141
mysqltest_embedded_LINK = $(CXXLINK)

mysql-test/r/fulltext.result

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,4 +433,7 @@ INSERT INTO t1 VALUES('testword\'\'');
433433
SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
434434
a
435435
testword''
436+
SELECT a FROM t1 WHERE MATCH a AGAINST('testword\'\'' IN BOOLEAN MODE);
437+
a
438+
testword''
436439
DROP TABLE t1;

mysql-test/r/grant.result

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,3 +594,24 @@ flush privileges;
594594
set @user123="non-existent";
595595
select * from mysql.db where user=@user123;
596596
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv
597+
set names koi8r;
598+
create database ��;
599+
grant select on ��.* to root@localhost;
600+
select hex(Db) from mysql.db where Db='��';
601+
hex(Db)
602+
D0B1D0B4
603+
show grants for root@localhost;
604+
Grants for root@localhost
605+
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
606+
GRANT SELECT ON `��`.* TO 'root'@'localhost'
607+
flush privileges;
608+
show grants for root@localhost;
609+
Grants for root@localhost
610+
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
611+
GRANT SELECT ON `��`.* TO 'root'@'localhost'
612+
drop database ��;
613+
revoke all privileges on ��.* from root@localhost;
614+
show grants for root@localhost;
615+
Grants for root@localhost
616+
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
617+
set names latin1;

mysql-test/r/group_min_max.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,3 +2002,13 @@ a count(a)
20022002
1 1
20032003
NULL 1
20042004
drop table t1;
2005+
create table t1 (f1 int, f2 char(1), primary key(f1,f2)) engine=innodb;
2006+
insert into t1 values ( 1,"e"),(2,"a"),( 3,"c"),(4,"d");
2007+
alter table t1 drop primary key, add primary key (f2, f1);
2008+
explain select distinct f1 a, f1 b from t1;
2009+
id select_type table type possible_keys key key_len ref rows Extra
2010+
1 SIMPLE t1 index NULL PRIMARY 5 NULL 4 Using index; Using temporary
2011+
explain select distinct f1, f2 from t1;
2012+
id select_type table type possible_keys key key_len ref rows Extra
2013+
1 SIMPLE t1 range NULL PRIMARY 5 NULL 3 Using index for group-by; Using temporary
2014+
drop table t1;

0 commit comments

Comments
 (0)