Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Golubchik committed Feb 12, 2010
2 parents ab1bdbe + 6e0d924 commit b6d030e
Show file tree
Hide file tree
Showing 35 changed files with 275 additions and 99 deletions.
76 changes: 58 additions & 18 deletions config/ac-macros/libevent.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ AC_DEFUN([MYSQL_USE_BUNDLED_LIBEVENT], [
libevent_libs="\$(top_builddir)/extra/libevent/libevent.a"
libevent_includes="-I\$(top_srcdir)/extra/libevent"
libevent_test_option="--mysqld=--thread-handling=pool-of-threads"
AC_SUBST(libevent_libs)
AC_SUBST(libevent_includes)
AC_SUBST(libevent_test_option)
AC_DEFINE([HAVE_LIBEVENT], [1], [If we want to use libevent and have connection pooling])
AC_MSG_RESULT([using bundled libevent])
dnl Get the upstream file with the original libevent configure macros.
dnl Use builtin include for this, to work around path problems in old versions of aclocal.
Expand All @@ -39,17 +32,64 @@ AC_DEFUN([MYSQL_CHECK_LIBEVENT], [
AC_CONFIG_FILES(extra/libevent/Makefile)
AC_MSG_CHECKING(for libevent)
AC_MSG_NOTICE([checking what libevent library to use])
AC_ARG_WITH([libevent],
[ --with-libevent use libevent and have connection pooling],
[with_libevent=$withval],
[with_libevent=no]
)
if test "$with_libevent" != "no"; then
MYSQL_USE_BUNDLED_LIBEVENT
else
AC_MSG_RESULT([disabled])
AC_HELP_STRING([--with-libevent=yes|no|bundled|DIR],
[Use libevent and have connection pooling.
A location of libevent library can be specified.
Given DIR, libevent library is
assumed to be in $DIR/lib and header files
in $DIR/include.]),
[with_libevent=${withval}],
[with_libevent=no])
case "$with_libevent" in
"no")
with_libevent=disabled
;;
"bundled")
MYSQL_USE_BUNDLED_LIBEVENT
;;
"" | "yes")
libevent_includes=""
libevent_libs="-levent"
AC_CHECK_LIB(event, evutil_socketpair,[with_libevent=system],
[with_libevent=bundled])
AC_CHECK_HEADER(evutil.h,,[with_libevent=bundled])
if test "$with_libevent" = "bundled"; then
MYSQL_USE_BUNDLED_LIBEVENT
fi
;;
*)
# Test for libevent using all known library file endings
if test \( -f "$with_libevent/lib/libevent.a" -o \
-f "$with_libevent/lib/libevent.so" -o \
-f "$with_libevent/lib/libevent.sl" -o \
-f "$with_libevent/lib/libevent.dylib" \) \
-a -f "$with_libevent/include/evutil.h"; then
libevent_includes="-I$with_libevent/include"
libevent_libs="-L$with_libevent/lib -levent"
AC_CHECK_LIB(event, evutil_socketpair,[with_libevent=$with_libevent],
[with_libevent=no], [$libevent_libs])
else
with_libevent=no
fi
if test "$with_libevent" = "no"; then
AC_MSG_ERROR([libevent headers or binaries were not found])
fi
;;
esac
AC_MSG_CHECKING(for libevent)
AC_MSG_RESULT([$with_libevent])
if test "$with_libevent" != "disabled"; then
libevent_test_option="--mysqld=--thread-handling=pool-of-threads"
AC_SUBST(libevent_libs)
AC_SUBST(libevent_includes)
AC_SUBST(libevent_test_option)
AC_DEFINE([HAVE_LIBEVENT], [1], [If we want to use libevent and have connection pooling])
fi
AM_CONDITIONAL([HAVE_LIBEVENT], [ test "$with_libevent" != "no" ])
AM_CONDITIONAL([HAVE_LIBEVENT], [ test "$with_libevent" != "disabled" ])
])

2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ AC_CHECK_TOOL([NM], [nm])

if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
then
tmp=`$NM ${other_libc_lib:-/usr/lib*}/libc.a | grep _nss_files_getaliasent_r1`
tmp=`$NM ${other_libc_lib:-/usr/lib*}/libc.a 2>&1 | grep _nss_files_getaliasent_r1`
if test -n "$tmp"
then
STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
Expand Down
2 changes: 1 addition & 1 deletion include/my_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ enum ha_storage_media {
enum ha_extra_function {
HA_EXTRA_NORMAL=0, /* Optimize for space (def) */
HA_EXTRA_QUICK=1, /* Optimize for speed */
HA_EXTRA_NOT_USED=2,
HA_EXTRA_NOT_USED=2, /* Should be ignored by handler */
HA_EXTRA_CACHE=3, /* Cache record in HA_rrnd() */
HA_EXTRA_NO_CACHE=4, /* End caching of records (def) */
HA_EXTRA_NO_READCHECK=5, /* No readcheck on update */
Expand Down
2 changes: 1 addition & 1 deletion libmysqld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ FILE(WRITE cmake_dummy.c " ")
# custom targets to "sql/CMakeLists.txt" and reference them here.
ADD_LIBRARY(mysqlserver STATIC ${LIBMYSQLD_SOURCES})
ADD_DEPENDENCIES(mysqlserver GenServerSource GenError)
TARGET_LINK_LIBRARIES(mysqlserver)
TARGET_LINK_LIBRARIES(mysqlserver psapi.lib)

# Add any additional libraries requested by engine(s)
FOREACH (ENGINE_LIB ${MYSQLD_STATIC_ENGINE_LIBS})
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5542,6 +5542,8 @@ ($)
if ( $message )
{
print STDERR "$message\n";
print STDERR "For full list of options, use $0 --help\n";
exit;
}

print <<HERE;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/r/sp-destruct.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted");
flush table mysql.proc;
use test;
drop procedure if exists bug14233;
drop function if exists bug14233;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/r/variables.result
Original file line number Diff line number Diff line change
Expand Up @@ -1261,12 +1261,12 @@ ERROR HY000: Variable 'lower_case_table_names' is a read only variable
#
SHOW VARIABLES like 'myisam_recover_options';
Variable_name Value
myisam_recover_options OFF
myisam_recover_options DEFAULT
SELECT @@session.myisam_recover_options;
ERROR HY000: Variable 'myisam_recover_options' is a GLOBAL variable
SELECT @@global.myisam_recover_options;
@@global.myisam_recover_options
OFF
DEFAULT
SET @@session.myisam_recover_options= 'x';
ERROR HY000: Variable 'myisam_recover_options' is a read only variable
SET @@global.myisam_recover_options= 'x';
Expand Down
14 changes: 7 additions & 7 deletions mysql-test/r/view.result
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ v5 VIEW
v6 VIEW
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Fixed 5 9 45 # 1024 0 NULL # # NULL latin1_swedish_ci NULL
v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW
v2 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW
v3 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW
v4 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW
v5 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW
v6 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW
t1 MyISAM 10 Fixed 5 9 45 # 1024 0 NULL # # # latin1_swedish_ci NULL
v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # # NULL NULL NULL VIEW
v2 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # # NULL NULL NULL VIEW
v3 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # # NULL NULL NULL VIEW
v4 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # # NULL NULL NULL VIEW
v5 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # # NULL NULL NULL VIEW
v6 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # # NULL NULL NULL VIEW
drop view v1,v2,v3,v4,v5,v6;
create view v1 (c,d,e,f) as select a,b,
a in (select a+2 from t1), a = all (select a from t1) from t1;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/maria/t/maria-recovery2-master.opt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--skip-stack-trace --skip-core-file --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp
--skip-stack-trace --skip-core-file --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--myisam-recover=off
1 change: 1 addition & 0 deletions mysql-test/t/sp-destruct.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 20, foun

# Backup proc table
let $MYSQLD_DATADIR= `select @@datadir`;
flush table mysql.proc;
--copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm
--copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD
--copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/t/view.test
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ explain extended select c from v6;
# show table/table status test
show tables;
show full tables;
--replace_column 8 # 12 # 13 #
--replace_column 8 # 12 # 13 # 14 #
show table status;

drop view v1,v2,v3,v4,v5,v6;
Expand Down
13 changes: 10 additions & 3 deletions sql-bench/bench-init.pl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";

$|=1; # Output data immediately

$opt_skip_test=$opt_skip_create=$opt_skip_delete=$opt_verbose=$opt_fast_insert=$opt_lock_tables=$opt_debug=$opt_skip_delete=$opt_fast=$opt_force=$opt_log=$opt_use_old_results=$opt_help=$opt_odbc=$opt_small_test=$opt_small_tables=$opt_samll_key_tables=$opt_stage=$opt_old_headers=$opt_die_on_errors=$opt_tcpip=$opt_random=$opt_only_missing_tests=0;
$opt_cmp=$opt_user=$opt_password=$opt_connect_options="";
$opt_skip_test=$opt_skip_create=$opt_skip_delete=$opt_verbose=$opt_fast_insert=$opt_lock_tables=$opt_debug=$opt_skip_delete=$opt_fast=$opt_force=$opt_log=$opt_use_old_results=$opt_help=$opt_odbc=$opt_small_test=$opt_small_tables=$opt_samll_key_tables=$opt_stage=$opt_old_headers=$opt_die_on_errors=$opt_tcpip=$opt_random=$opt_only_missing_tests=$opt_temporary_tables=0;
$opt_cmp=$opt_user=$opt_password=$opt_connect_options=$opt_connect_command= "";
$opt_server="mysql"; $opt_dir="output";
$opt_host="localhost";$opt_database="test";
$opt_machine=""; $opt_suffix="";
Expand All @@ -59,7 +59,7 @@ $log_prog_args=join(" ", skip_arguments(\@ARGV,"comments","cmp","server",
"use-old-results","skip-test",
"optimization","hw",
"machine", "dir", "suffix", "log"));
GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","threads=i","random","old-headers","die-on-errors","create-options=s","hires","tcpip","silent","optimization=s","hw=s","socket=s","connect-options=s","only-missing-tests") || usage();
GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","threads=i","random","old-headers","die-on-errors","create-options=s","hires","tcpip","silent","optimization=s","hw=s","socket=s","connect-options=s","connect-command=s","only-missing-tests","temporary-tables") || usage();

usage() if ($opt_help);
$server=get_server($opt_server,$opt_host,$opt_database,$opt_odbc,
Expand Down Expand Up @@ -454,6 +454,9 @@ All benchmarks takes the following options:
create all MySQL tables as InnoDB tables use:
--create-options=ENGINE=InnoDB
--temporary-tables
Use temporary tables for all tests.
--database (Default $opt_database)
In which database the test tables are created.
Expand Down Expand Up @@ -595,6 +598,10 @@ All benchmarks takes the following options:
Add options, which uses at DBI connect.
For example --connect-options=mysql_read_default_file=/etc/my.cnf.
--connect-command='SQL command'
Initialization command to execute when logged in. Useful for setting
up the environment.
EOF
exit(0);
}
Expand Down
Loading

0 comments on commit b6d030e

Please sign in to comment.