Commit 68092713 authored by tsmith@maint2.mysql.com's avatar tsmith@maint2.mysql.com

Merge maint2.mysql.com:/data/localhome/tsmith/bk/bfx/50

into  maint2.mysql.com:/data/localhome/tsmith/bk/bfx/51
parents 121852a7 d5ee5049
...@@ -51,7 +51,7 @@ parse_options() ...@@ -51,7 +51,7 @@ parse_options()
######################################################################## ########################################################################
if ! test -f sql/mysqld.cc if test ! -f sql/mysqld.cc
then then
echo "You must run this script from the MySQL top-level directory" echo "You must run this script from the MySQL top-level directory"
exit 1 exit 1
...@@ -185,12 +185,6 @@ fi ...@@ -185,12 +185,6 @@ fi
# (returns 0 if finds lines) # (returns 0 if finds lines)
if ccache -V > /dev/null 2>&1 if ccache -V > /dev/null 2>&1
then then
if ! (echo "$CC" | grep "ccache" > /dev/null) echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC"
then echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX"
CC="ccache $CC"
fi
if ! (echo "$CXX" | grep "ccache" > /dev/null)
then
CXX="ccache $CXX"
fi
fi fi
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# Check cpu of current machine and find the # Check cpu of current machine and find the
# best compiler optimization flags for gcc # best compiler optimization flags for gcc
# #
#
if test -r /proc/cpuinfo ; then check_cpu () {
if test -r /proc/cpuinfo ; then
# on Linux (and others?) we can get detailed CPU information out of /proc # on Linux (and others?) we can get detailed CPU information out of /proc
cpuinfo="cat /proc/cpuinfo" cpuinfo="cat /proc/cpuinfo"
...@@ -31,7 +31,7 @@ if test -r /proc/cpuinfo ; then ...@@ -31,7 +31,7 @@ if test -r /proc/cpuinfo ; then
for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do
eval cpu_flag_$flag=yes eval cpu_flag_$flag=yes
done done
else else
# Fallback when there is no /proc/cpuinfo # Fallback when there is no /proc/cpuinfo
case "`uname -s`" in case "`uname -s`" in
FreeBSD|OpenBSD) FreeBSD|OpenBSD)
...@@ -47,12 +47,12 @@ else ...@@ -47,12 +47,12 @@ else
model_name=`uname -p`; model_name=`uname -p`;
;; ;;
esac esac
fi fi
# detect CPU shortname as used by gcc options # detect CPU shortname as used by gcc options
# this list is not complete, feel free to add further entries # this list is not complete, feel free to add further entries
cpu_arg="" cpu_arg=""
case "$cpu_family--$model_name" in case "$cpu_family--$model_name" in
# DEC Alpha # DEC Alpha
Alpha*EV6*) Alpha*EV6*)
cpu_arg="ev6"; cpu_arg="ev6";
...@@ -113,27 +113,27 @@ case "$cpu_family--$model_name" in ...@@ -113,27 +113,27 @@ case "$cpu_family--$model_name" in
*) *)
cpu_arg=""; cpu_arg="";
;; ;;
esac esac
if test -z "$cpu_arg"; then if test -z "$cpu_arg"; then
echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2
check_cpu_cflags="" check_cpu_cflags=""
return return
fi fi
# different compiler versions have different option names # different compiler versions have different option names
# for CPU specific command line options # for CPU specific command line options
if test -z "$CC" ; then if test -z "$CC" ; then
cc="gcc"; cc="gcc";
else else
cc=$CC cc=$CC
fi fi
cc_ver=`$cc --version | sed 1q` cc_ver=`$cc --version | sed 1q`
cc_verno=`echo $cc_ver | sed -e 's/[^0-9. ]//g; s/^ *//g; s/ .*//g'` cc_verno=`echo $cc_ver | sed -e 's/[^0-9. ]//g; s/^ *//g; s/ .*//g'`
case "$cc_ver--$cc_verno" in case "$cc_ver--$cc_verno" in
*GCC*) *GCC*)
# different gcc backends (and versions) have different CPU flags # different gcc backends (and versions) have different CPU flags
case `gcc -dumpmachine` in case `gcc -dumpmachine` in
...@@ -167,22 +167,23 @@ case "$cc_ver--$cc_verno" in ...@@ -167,22 +167,23 @@ case "$cc_ver--$cc_verno" in
check_cpu_cflags="" check_cpu_cflags=""
return return
;; ;;
esac esac
# now we check whether the compiler really understands the cpu type # now we check whether the compiler really understands the cpu type
touch __test.c touch __test.c
while [ "$cpu_arg" ] ; do while [ "$cpu_arg" ] ; do
echo -n testing $cpu_arg "... " # FIXME: echo -n isn't portable - see contortions autoconf goes through
echo -n testing $cpu_arg "... " >&2
# compile check # compile check
check_cpu_cflags=`eval echo $check_cpu_args` check_cpu_cflags=`eval echo $check_cpu_args`
if $cc -c $check_cpu_cflags __test.c 2>/dev/null; then if $cc -c $check_cpu_cflags __test.c 2>/dev/null; then
echo ok echo ok >&2
break; break;
fi fi
echo failed echo failed >&2
check_cpu_cflags="" check_cpu_cflags=""
# if compile failed: check whether it supports a predecessor of this CPU # if compile failed: check whether it supports a predecessor of this CPU
...@@ -205,7 +206,9 @@ while [ "$cpu_arg" ] ; do ...@@ -205,7 +206,9 @@ while [ "$cpu_arg" ] ; do
*) cpu_arg="" ;; *) cpu_arg="" ;;
esac esac
done done
rm __test.* rm __test.*
}
check_cpu
...@@ -734,26 +734,26 @@ drop table if exists bug20536; ...@@ -734,26 +734,26 @@ drop table if exists bug20536;
set names latin1; set names latin1;
create table bug20536 (id bigint not null auto_increment primary key, name create table bug20536 (id bigint not null auto_increment primary key, name
varchar(255) character set ucs2 not null); varchar(255) character set ucs2 not null);
insert into `bug20536` (`id`,`name`) values (1, _latin1 x'74657374311a'), (2, "'test\\_2'"); insert into `bug20536` (`id`,`name`) values (1, _latin1 x'7465737431'), (2, "'test\\_2'");
select md5(name) from bug20536; select md5(name) from bug20536;
md5(name) md5(name)
3417d830fe24ffb2f81a28e54df2d1b3 f4b7ce8b45a20e3c4e84bef515d1525c
48d95db0d8305c2fe11548a3635c9385 48d95db0d8305c2fe11548a3635c9385
select sha1(name) from bug20536; select sha1(name) from bug20536;
sha1(name) sha1(name)
72228a6d56efb7a89a09543068d5d8fa4c330881 e0b52f38deddb9f9e8d5336b153592794cb49baf
677d4d505355eb5b0549b865fcae4b7f0c28aef5 677d4d505355eb5b0549b865fcae4b7f0c28aef5
select make_set(3, name, upper(name)) from bug20536; select make_set(3, name, upper(name)) from bug20536;
make_set(3, name, upper(name)) make_set(3, name, upper(name))
test1,TEST1 test1,TEST1
'test\_2','TEST\_2' 'test\_2','TEST\_2'
select export_set(5, name, upper(name)) from bug20536; select export_set(5, name, upper(name)) from bug20536;
export_set(5, name, upper(name)) export_set(5, name, upper(name))
test1,TEST1,test1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1 test1,TEST1,test1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1
'test\_2','TEST\_2','test\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2' 'test\_2','TEST\_2','test\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2'
select export_set(5, name, upper(name), ",", 5) from bug20536; select export_set(5, name, upper(name), ",", 5) from bug20536;
export_set(5, name, upper(name), ",", 5) export_set(5, name, upper(name), ",", 5)
test1,TEST1,test1,TEST1,TEST1 test1,TEST1,test1,TEST1,TEST1
'test\_2','TEST\_2','test\_2','TEST\_2','TEST\_2' 'test\_2','TEST\_2','test\_2','TEST\_2','TEST\_2'
select password(name) from bug20536; select password(name) from bug20536;
password(name) password(name)
...@@ -769,7 +769,7 @@ SA5pDi1UPZdys ...@@ -769,7 +769,7 @@ SA5pDi1UPZdys
SA5pDi1UPZdys SA5pDi1UPZdys
select quote(name) from bug20536; select quote(name) from bug20536;
quote(name) quote(name)
?????????? ????????
???????????????? ????????????????
drop table bug20536; drop table bug20536;
End of 4.1 tests End of 4.1 tests
......
...@@ -477,7 +477,7 @@ drop table if exists bug20536; ...@@ -477,7 +477,7 @@ drop table if exists bug20536;
set names latin1; set names latin1;
create table bug20536 (id bigint not null auto_increment primary key, name create table bug20536 (id bigint not null auto_increment primary key, name
varchar(255) character set ucs2 not null); varchar(255) character set ucs2 not null);
insert into `bug20536` (`id`,`name`) values (1, _latin1 x'74657374311a'), (2, "'test\\_2'"); insert into `bug20536` (`id`,`name`) values (1, _latin1 x'7465737431'), (2, "'test\\_2'");
select md5(name) from bug20536; select md5(name) from bug20536;
select sha1(name) from bug20536; select sha1(name) from bug20536;
select make_set(3, name, upper(name)) from bug20536; select make_set(3, name, upper(name)) from bug20536;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment