Commit dd7e3678 authored by Sergei Golubchik's avatar Sergei Golubchik

merge with 5.3

sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
parents 063f9d17 cc32ae9e

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -117,6 +117,7 @@ client/rpl_tblmap.cc
client/rpl_tblmap.h
client/rpl_utility.cc
client/rpl_utility.h
client/rpl_utility.cc
client/select_test
client/sql_const.h
client/sql_list.cc
......@@ -456,6 +457,11 @@ libmysqld/transaction.cc
libmysqld/tztime.cc
libmysqld/uniques.cc
libmysqld/unireg.cc
libmysqld/discover_xt.cc
libmysqld/ha_pbxt.cc
libmysqld/myxt_xt.cc
libmysqld/rpl_reporting.cc
libmysqld/rpl_utility.cc
libmysqltest/*.ds?
libmysqltest/mytest.c
libtool
......@@ -1100,3 +1106,26 @@ Testing
info_macros.cmake
VERSION.dep
configure
libmysqld/examples/mysqltest.cc
extra/libevent/event-config.h
libmysqld/opt_table_elimination.cc
libmysqld/ha_federatedx.cc
libmysqld/multi_range_read.cc
libmysqld/opt_index_cond_pushdown.cc
libmysqld/opt_subselect.cc
libmysqld/sql_join_cache.cc
client/rpl_filter.cc
client/rpl_filter.h
client/sql_list.cc
client/sql_list.h
libmysqld/create_options.cc
storage/pbxt/bin/xtstat
libmysqld/sql_expression_cache.cc
mysql-test/mtr_command
scripts/convert-debug-for-diff
plugin/handler_socket/client/hsclient
client/strings_def.h
libmysql/strings_def.h
libmysql_r/strings_def.h
storage/maria/aria_log_control
scripts/mytop
......@@ -16,7 +16,6 @@
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
########################################################################
get_key_value()
......@@ -130,7 +129,7 @@ elif [ "x$warning_mode" = "xmaintainer" ]; then
debug_extra_cflags="-g3"
else
# Both C and C++ warnings
warnings="-Wall -Wextra -Wunused -Wwrite-strings"
warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized"
# For more warnings, uncomment the following line
# warnings="$warnings -Wshadow"
......@@ -149,13 +148,14 @@ fi
# Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro
# LINT_INIT(), which is only useful for silencing spurious warnings
# of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind.
valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify -DHAVE_valgrind "
valgrind_flags="-DHAVE_valgrind -DHAVE_purify -USAFEMALLOC"
valgrind_flags="$valgrind_flags -UFORCE_INIT_OF_VARS -Wno-uninitialized"
valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
valgrind_configs="--with-valgrind"
#
# Used in -debug builds
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
debug_cflags="$debug_cflags -DSAFE_MUTEX"
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG"
debug_cflags="$debug_cflags -DSAFE_MUTEX -DSAFEMALLOC"
error_inject="--with-error-inject "
#
# Base C++ flags for all builds
......@@ -171,9 +171,6 @@ then
debug_cflags="$debug_cflags $debug_extra_cflags"
fi
static_link="--with-mysqld-ldflags=-all-static "
static_link="$static_link --with-client-ldflags=-all-static"
# we need local-infile in all binaries for rpl000001
# if you need to disable local-infile in the client, write a build script
# and unset local_infile_configs
......@@ -187,8 +184,6 @@ base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client "
base_configs="$base_configs --with-big-tables $maintainer_mode"
base_configs="$base_configs --with-plugin-aria --with-aria-tmp-tables"
# Compile our client programs with static libraries to allow them to be moved
base_configs="$base_configs --with-mysqld-ldflags=-static --with-client-ldflags=-static"
if test -d "$path/../cmd-line-utils/readline"
then
......@@ -230,6 +225,24 @@ if test -z "$CXX" ; then
CXX=g++
fi
#
# Set -Wuninitialized to debug flags for gcc 4.4 and above
# because it is allowed there without -O
#
if test `$CC -v 2>&1 | tail -1 | sed 's/ .*$//'` = 'gcc' ; then
GCCVERSION=`$CC -v 2>&1 | tail -1 | \
sed 's/^[a-zA-Z][a-zA-Z]* [a-zA-Z][a-zA-Z]* //' | sed 's/ .*$//'`
GCCV1=`echo $GCCVERSION | sed 's/\..*$//'`
GCCV2=`echo $GCCVERSION | sed 's/[0-9][0-9]*\.//'|sed 's/\..*$//'`
if test '(' "$GCCV1" -gt '4' ')' -o \
'(' '(' "$GCCV1" -eq '4' ')' -a '(' "$GCCV2" -ge '4' ')' ')'
then
debug_cflags="$debug_cflags -DFORCE_INIT_OF_VARS -Wuninitialized"
fi
fi
# If ccache (a compiler cache which reduces build time)
# (http://samba.org/ccache) is installed, use it.
# We use 'grep' and hope 'grep' will work as expected
......
This diff is collapsed.
#!/bin/sh
# Copyright (C) 2005, 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Check cpu of current machine and find the
# best compiler optimization flags for gcc
......
#! /bin/sh
# Copyright (C) 2000, 2005 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/bin/rm -f */.deps/*.P */*.o
make -k maintainer-clean
/bin/rm -f */.deps/*.P */*.o
......@@ -23,5 +8,5 @@ make -k maintainer-clean
path=`dirname $0`
. "$path/autorun.sh"
CFLAGS=-O1 CC=gcc CXX=gcc CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
CFLAGS=-O1 CC=gcc CXX=g++ CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
make
#!/bin/sh
# Copyright (C) 2004, 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# This script's purpose is to update the automake/autoconf helper scripts and
# to run a plain "configure" without any special compile flags. Only features
......@@ -44,7 +28,7 @@ fi
# Default to gcc for CC and CXX
if test -z "$CXX" ; then
export CXX
CXX=gcc
CXX=g++
# Set some required compile options
if test -z "$CXXFLAGS" ; then
export CXXFLAGS
......
#! /bin/sh
# Copyright (C) 2000, 2005 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AM_MAKEFLAGS="-j 2"
gmake -k maintainer-clean || true
/bin/rm -f */.deps/*.P config.cache
......@@ -23,7 +8,7 @@ path=`dirname $0`
. "$path/autorun.sh"
export PATH=/usr/local/pgcc/bin:$PATH
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
gmake -j 4
......
#! /bin/sh
# Copyright (C) 2006, 2007 MySQL AB
#
# This program 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; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $fast_cflags"
extra_configs="$pentium_configs $static_link"
# On CentOS/Fedora Core 10 amd64, there is system libz.so but not
# libz.a, so need to use bundled zlib when building static
# binary. Hence we use --with-zlib-dir=bundled
extra_configs="$pentium_configs $static_link --with-zlib-dir=bundled"
CC="$CC --pipe"
strip=yes
......
......@@ -16,7 +16,7 @@ gmake -k maintainer-clean || true
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="-m64 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
extra_flags="-m64 -fast -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
extra_configs="$max_configs --with-libevent"
warnings=""
......
#!/bin/sh
# See file compile-solaris-amd64 for basic pre-requisites.
# This build uses the Sun Studio compilers (cc, CC), available from:
# http://developers.sun.com/sunstudio/downloads/index.jsp
# Note that you may want to apply current patches, as the downloaded version
# is typically out of date. Download the PKG version if you intend to patch!
# After installing, add /opt/SUNWspro/bin to your $PATH
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
. "$path/SETUP.sh"
extra_flags="-g -m64 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
extra_configs="$max_configs --with-libevent"
warnings=""
c_warnings=""
cxx_warnings=""
base_cxxflags="-noex"
CC=cc
CFLAGS="-xstrconst"
CXX=CC
LDFLAGS="-lmtmalloc"
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (C) 2000, 2005 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
make -k clean || true
/bin/rm -f */.deps/*.P config.cache
......@@ -24,6 +9,6 @@ PATH=$PATH:/usr/ccs/bin:/usr/local/bin
path=`dirname $0`
. "$path/autorun.sh"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
make -j 4
#!/bin/sh
# Copyright (C) 2001, 2005 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
make -k clean || true
/bin/rm -f */.deps/*.P config.cache
path=`dirname $0`
. "$path/autorun.sh"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
make -j 4
#! /bin/sh
# Copyright (C) 2000, 2005 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
mode=""
cxxfilt=""
......@@ -52,7 +37,7 @@ make -k maintainer-clean || true
path=`dirname $0`
. "$path/autorun.sh"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_valgrind -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_valgrind -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_valgrind -DEXTRA_DEBUG -O2" CXX=g++ CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_valgrind -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
make -j 4
......
......@@ -223,7 +223,7 @@ ENDIF()
# Set commonly used variables
IF(WIN32)
SET(DEFAULT_MYSQL_HOME "C:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}" )
SET(DEFAULT_MYSQL_HOME "C:/MariaDB${MYSQL_BASE_VERSION}")
SET(SHAREDIR share)
ELSE()
SET(DEFAULT_MYSQL_HOME ${CMAKE_INSTALL_PREFIX})
......
This diff is collapsed.
This diff is collapsed.
......@@ -50,6 +50,7 @@ enum options_client
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
OPT_FLUSH_TABLES,
OPT_TRIGGERS,
OPT_MYSQL_ONLY_PRINT,
OPT_MYSQL_LOCK_DIRECTORY,
......@@ -86,6 +87,8 @@ enum options_client
OPT_DEFAULT_AUTH,
OPT_ABORT_SOURCE_ON_ERROR,
OPT_REWRITE_DB,
OPT_REPORT_PROGRESS,
OPT_SKIP_ANNOTATE_ROWS_EVENTS,
OPT_MAX_CLIENT_OPTION /* should be always the last */
};
......
/* Copyright (C) 2000-2009 MySQL AB
Copyright 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Copyright 2000, 2010, Oracle and/or its affiliates.
Copyright 2000-2010 Monty Program Ab
This program is free software; you can redistribute it and/or modify
......@@ -45,7 +45,7 @@
#include <locale.h>
#endif
const char *VER= "14.16";
const char *VER= "15.0";
/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH 1024
......@@ -142,7 +142,7 @@ static my_bool ignore_errors=0,wait_flag=0,quick=0,
default_pager_set= 0, opt_sigint_ignore= 0,
auto_vertical_output= 0,
show_warnings= 0, executing_query= 0,
ignore_spaces= 0;
ignore_spaces= 0, opt_progress_reports;
static my_bool debug_info_flag, debug_check_flag, batch_abort_on_error;
static my_bool column_types_flag;
static my_bool preserve_comments= 0;
......@@ -242,6 +242,13 @@ static void init_username();
static void add_int_to_prompt(int toadd);
static int get_result_width(MYSQL_RES *res);
static int get_field_disp_length(MYSQL_FIELD * field);
#ifndef EMBEDDED_LIBRARY
static uint last_progress_report_length= 0;
static void report_progress(const MYSQL *mysql, uint stage, uint max_stage,
double progress, const char *proc_info,
uint proc_info_length);
#endif
static void report_progress_end();
/* A structure which contains information on the commands this program
can understand. */
......@@ -1018,7 +1025,8 @@ static COMMANDS commands[] = {
{ (char *)NULL, 0, 0, 0, ""}
};
static const char *load_default_groups[]= { "mysql","client",0 };
static const char *load_default_groups[]=
{ "mysql", "client", "client-server", "client-mariadb", 0 };
static int embedded_server_arg_count= 0;
static char *embedded_server_args[MAX_SERVER_ARGS];
......@@ -1500,6 +1508,10 @@ static struct my_option my_long_options[] =
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
&opt_mysql_port,
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"progress-reports", OPT_REPORT_PROGRESS,
"Get progress reports for long running commands (like ALTER TABLE)",
&opt_progress_reports, &opt_progress_reports, 0, GET_BOOL, NO_ARG, 1, 0,
0, 0, 0, 0},
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
&current_prompt, &current_prompt, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
......@@ -1821,6 +1833,7 @@ static int get_options(int argc, char **argv)
opt_outfile= 0;
opt_reconnect= 0;
connect_flag= 0; /* Not in interactive mode */
opt_progress_reports= 0;
}
if (argc > 1)
......@@ -1844,6 +1857,9 @@ static int get_options(int argc, char **argv)
if (ignore_spaces)
connect_flag|= CLIENT_IGNORE_SPACE;
if (opt_progress_reports)
connect_flag|= CLIENT_PROGRESS;
return(0);
}
......@@ -3005,6 +3021,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
timer=start_timer();
executing_query= 1;
error= mysql_real_query_for_lazy(buffer->ptr(),buffer->length());
report_progress_end();
#ifdef HAVE_READLINE
if (status.add_to_history)
......@@ -4425,6 +4442,13 @@ sql_real_connect(char *host,char *database,char *user,char *password,
connected=1;
#ifndef EMBEDDED_LIBRARY
mysql.reconnect= debug_info_flag; // We want to know if this happens
/*
CLIENT_PROGRESS is set only if we requsted it in mysql_real_connect()
and the server also supports it
*/
if (mysql.client_flag & CLIENT_PROGRESS)
mysql_options(&mysql, MYSQL_PROGRESS_CALLBACK, (void*) report_progress);
#else
mysql.reconnect= 1;
#endif
......@@ -5056,3 +5080,32 @@ static int com_prompt(String *buffer __attribute__((unused)),
tee_fprintf(stdout, "PROMPT set to '%s'\n", current_prompt);
return 0;
}
#ifndef EMBEDDED_LIBRARY
static void report_progress(const MYSQL *mysql, uint stage, uint max_stage,
double progress, const char *proc_info,
uint proc_info_length)
{
uint length= printf("Stage: %d of %d '%.*s' %6.3g%% of stage done",
stage, max_stage, proc_info_length, proc_info,
progress);
if (length < last_progress_report_length)
printf("%*s", last_progress_report_length - length, "");
putc('\r', stdout);
fflush(stdout);
last_progress_report_length= length;
}
static void report_progress_end()
{
if (last_progress_report_length)
{
printf("%*s\r", last_progress_report_length, "");
last_progress_report_length= 0;
}
}
#else
static void report_progress_end()
{
}
#endif
......@@ -839,8 +839,10 @@ static int run_sql_fix_privilege_tables(void)
static const char *load_default_groups[]=
{
"client", /* Read settings how to connect to server */
"mysql_upgrade", /* Read special settings for mysql_upgrade*/
"client", /* Read settings how to connect to server */
"mysql_upgrade", /* Read special settings for mysql_upgrade */
"client-server", /* Reads settings common between client & server */
"client-mariadb", /* Read mariadb unique client settings */
0
};
......
......@@ -222,7 +222,8 @@ static struct my_option my_long_options[] =
};
static const char *load_default_groups[]= { "mysqladmin","client",0 };
static const char *load_default_groups[]=
{ "mysqladmin", "client", "client-server", "client-mariadb", 0 };
my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
......
This diff is collapsed.
......@@ -16,7 +16,7 @@
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
#define CHECK_VERSION "2.6.0"
#define CHECK_VERSION "2.7.0"
#include "client_priv.h"
#include <m_ctype.h>
......@@ -36,8 +36,8 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0,
opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0,
tty_password= 0, opt_frm= 0, debug_info_flag= 0, debug_check_flag= 0,
opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0,
opt_write_binlog= 1;
opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0;
static my_bool opt_write_binlog= 1, opt_flush_tables= 0;
static uint verbose = 0, opt_mysql_port=0;
static int my_end_arg;
static char * opt_mysql_unix_port = 0;
......@@ -123,6 +123,9 @@ static struct my_option my_long_options[] =
"If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will force using old slow repair with keycache method, instead of much faster repair by sorting.",
&opt_extended, &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"flush", OPT_FLUSH_TABLES, "Flush each table after check. This is useful if you don't want to have the checked tables take up space in the caches after the check",
&opt_flush_tables, &opt_flush_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0 },
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"host",'h', "Connect to host.", &current_host,
......@@ -192,7 +195,8 @@ static struct my_option my_long_options[] =
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
static const char *load_default_groups[] = { "mysqlcheck", "client", 0 };
static const char *load_default_groups[]=
{ "mysqlcheck", "client", "client-server", "client-mariadb", 0 };
static void print_version(void);
......@@ -740,6 +744,7 @@ static int disable_binlog()
static int handle_request_for_tables(char *tables, uint length)
{
char *query, *end, options[100], message[100];
char table_name_buff[NAME_CHAR_LEN*2*2+1], *table_name;
uint query_length= 0;
const char *op = 0;
DBUG_ENTER("handle_request_for_tables");
......@@ -778,13 +783,17 @@ static int handle_request_for_tables(char *tables, uint length)
{
/* No backticks here as we added them before */
query_length= sprintf(query, "%s TABLE %s %s", op, tables, options);
table_name= tables;
}
else
{
char *ptr;
char *ptr, *org;
ptr= strmov(strmov(query, op), " TABLE ");
org= ptr= strmov(strmov(query, op), " TABLE ");
ptr= fix_table_name(ptr, tables);
strmake(table_name_buff, org, min((int) sizeof(table_name_buff)-1,
(int) (ptr - org)));
table_name= table_name_buff;
ptr= strxmov(ptr, " ", options, NullS);
query_length= (uint) (ptr - query);
}
......@@ -792,9 +801,20 @@ static int handle_request_for_tables(char *tables, uint length)
{
sprintf(message, "when executing '%s TABLE ... %s'", op, options);
DBerror(sock, message);
my_free(query);
DBUG_RETURN(1);
}
print_result();
if (opt_flush_tables)
{
query_length= sprintf(query, "FLUSH TABLES %s", table_name);
if (mysql_real_query(sock, query, query_length))
{
DBerror(sock, query);
my_free(query);
DBUG_RETURN(1);
}
}
my_free(query);
DBUG_RETURN(0);
}
......
......@@ -36,7 +36,7 @@
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
*/
#define DUMP_VERSION "10.13"
#define DUMP_VERSION "10.14"
#include <my_global.h>
#include <my_sys.h>
......@@ -78,6 +78,9 @@
#define IGNORE_DATA 0x01 /* don't dump data for this table */
#define IGNORE_INSERT_DELAYED 0x02 /* table doesn't support INSERT DELAYED */
/* Chars needed to store LONGLONG, excluding trailing '\0'. */
#define LONGLONG_LEN 20
static void add_load_option(DYNAMIC_STRING *str, const char *option,
const char *option_value);
static ulong find_set(TYPELIB *lib, const char *x, uint length,
......@@ -368,9 +371,9 @@ static struct my_option my_long_options[] =
"This causes the binary log position and filename to be appended to the "
"output. If equal to 1, will print it as a CHANGE MASTER command; if equal"
" to 2, that command will be prefixed with a comment symbol. "
"This option will turn --lock-all-tables on, unless "
"--single-transaction is specified too (in which case a "
"global read lock is only taken a short time at the beginning of the dump; "
"This option will turn --lock-all-tables on, unless --single-transaction "
"is specified too (on servers before MariaDB 5.3 this will still take a "
"global read lock for a short time at the beginning of the dump; "
"don't forget to read about --single-transaction below). In all cases, "
"any action on logs will happen at the exact moment of the dump. "
"Option automatically turns --lock-tables off.",
......@@ -510,7 +513,8 @@ static struct my_option my_long_options[] =
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
static const char *load_default_groups[]= { "mysqldump","client",0 };
static const char *load_default_groups[]=
{ "mysqldump", "client", "client-server", "client-mariadb", 0 };
static void maybe_exit(int error);
static void die(int error, const char* reason, ...);
......@@ -655,8 +659,13 @@ static void write_header(FILE *sql_file, char *db_name)
if (!path)
{
if (!opt_no_create_info)
{
/* We don't need unique checks as the table is created just before */
fprintf(md_result_file,"\
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n");
}
fprintf(md_result_file,"\
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n\
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n\
");
}
......@@ -686,8 +695,12 @@ static void write_footer(FILE *sql_file)
if (!path)
{
fprintf(md_result_file,"\
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n\
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n");
if (!opt_no_create_info)
{
fprintf(md_result_file,"\
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n");
}
}
if (opt_set_charset)
fprintf(sql_file,
......@@ -1128,6 +1141,44 @@ static int fetch_db_collation(const char *db_name,
}
/*
Check if server supports non-blocking binlog position using the
binlog_snapshot_file and binlog_snapshot_position status variables. If it
does, also return the position obtained if output pointers are non-NULL.
Returns 1 if position available, 0 if not.
*/
static int
check_consistent_binlog_pos(char *binlog_pos_file, char *binlog_pos_offset)
{
MYSQL_RES *res;
MYSQL_ROW row;
int found;
if (mysql_query_with_error_report(mysql, &res,
"SHOW STATUS LIKE 'binlog_snapshot_%'"))
return 1;
found= 0;
while ((row= mysql_fetch_row(res)))
{
if (0 == strcmp(row[0], "binlog_snapshot_file"))
{
if (binlog_pos_file)
strmake(binlog_pos_file, row[1], FN_REFLEN-1);
found++;
}
else if (0 == strcmp(row[0], "binlog_snapshot_position"))
{
if (binlog_pos_offset)
strmake(binlog_pos_offset, row[1], LONGLONG_LEN);
found++;
}
}
mysql_free_result(res);
return (found == 2);
}
static char *my_case_str(const char *str,
uint str_len,
const char *token,
......@@ -4369,42 +4420,65 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
} /* dump_selected_tables */
static int do_show_master_status(MYSQL *mysql_con)
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
{
MYSQL_ROW row;
MYSQL_RES *master;
char binlog_pos_file[FN_REFLEN];
char binlog_pos_offset[LONGLONG_LEN+1];
char *file, *offset;
const char *comment_prefix=
(opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL) ? "-- " : "";
if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS"))
if (consistent_binlog_pos)
{
return 1;
if(!check_consistent_binlog_pos(binlog_pos_file, binlog_pos_offset))
return 1;
file= binlog_pos_file;
offset= binlog_pos_offset;
}
else
{
if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS"))
return 1;
row= mysql_fetch_row(master);
if (row && row[0] && row[1])
{
/* SHOW MASTER STATUS reports file and position */
if (opt_comments)
fprintf(md_result_file,
"\n--\n-- Position to start replication or point-in-time "
"recovery from\n--\n\n");
fprintf(md_result_file,
"%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
comment_prefix, row[0], row[1]);
check_io(md_result_file);
file= row[0];
offset= row[1];
}
else if (!ignore_errors)
else
{
/* SHOW MASTER STATUS reports nothing and --force is not enabled */
my_printf_error(0, "Error: Binlogging on server not active",
MYF(0));
mysql_free_result(master);
maybe_exit(EX_MYSQLERR);
return 1;
if (!ignore_errors)
{
/* SHOW MASTER STATUS reports nothing and --force is not enabled */
my_printf_error(0, "Error: Binlogging on server not active",
MYF(0));
maybe_exit(EX_MYSQLERR);
return 1;
}
else
{
return 0;
}
}
mysql_free_result(master);
}
/* SHOW MASTER STATUS reports file and position */
if (opt_comments)
fprintf(md_result_file,
"\n--\n-- Position to start replication or point-in-time "
"recovery from\n--\n\n");
fprintf(md_result_file,
"%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
comment_prefix, file, offset);
check_io(md_result_file);
if (!consistent_binlog_pos)
mysql_free_result(master);
return 0;
}
......@@ -5167,6 +5241,7 @@ int main(int argc, char **argv)
{
char bin_log_name[FN_REFLEN];
int exit_code;
int consistent_binlog_pos= 0;
MY_INIT("mysqldump");
compatible_mode_normal_str[0]= 0;
......@@ -5200,7 +5275,13 @@ int main(int argc, char **argv)
if (opt_slave_data && do_stop_slave_sql(mysql))
goto err;
if ((opt_lock_all_tables || opt_master_data) &&
if (opt_single_transaction && opt_master_data)
{
/* See if we can avoid FLUSH TABLES WITH READ LOCK (MariaDB 5.3+). */
consistent_binlog_pos= check_consistent_binlog_pos(NULL, NULL);
}
if ((opt_lock_all_tables || (opt_master_data && !consistent_binlog_pos)) &&
do_flush_tables_read_lock(mysql))
goto err;
if (opt_single_transaction && start_transaction(mysql))
......@@ -5218,10 +5299,11 @@ int main(int argc, char **argv)
goto err;
flush_logs= 0; /* not anymore; that would not be sensible */
}
/* Add 'STOP SLAVE to beginning of dump */
if (opt_slave_apply && add_stop_slave())
goto err;
if (opt_master_data && do_show_master_status(mysql))
if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos))
goto err;
if (opt_slave_data && do_show_slave_status(mysql))
goto err;
......
......@@ -188,7 +188,8 @@ static struct my_option my_long_options[] =
};
static const char *load_default_groups[]= { "mysqlimport","client",0 };
static const char *load_default_groups[]=
{ "mysqlimport","client", "client-server", "client-mariadb", 0 };
static void print_version(void)
......
......@@ -55,7 +55,8 @@ static void print_res_header(MYSQL_RES *result);
static void print_res_top(MYSQL_RES *result);
static void print_res_row(MYSQL_RES *result,MYSQL_ROW cur);
static const char *load_default_groups[]= { "mysqlshow","client",0 };
static const char *load_default_groups[]=
{ "mysqlshow","client", "client-server", "client-mariadb", 0 };
static char * opt_mysql_unix_port=0;
int main(int argc, char **argv)
......
......@@ -175,7 +175,8 @@ static uint opt_protocol= 0;
static int get_options(int *argc,char ***argv);
static uint opt_mysql_port= 0;
static const char *load_default_groups[]= { "mysqlslap","client",0 };
static const char *load_default_groups[]=
{ "mysqlslap", "client", "client-server", "client-mariadb", 0 };
typedef struct statement statement;
......@@ -1384,9 +1385,9 @@ get_options(int *argc,char ***argv)
fprintf(stderr,"%s: Could not open create file\n", my_progname);
exit(1);
}
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
tmp_string= (char *)my_malloc((size_t)sbuf.st_size + 1,
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
my_read(data_file, (uchar*) tmp_string, (size_t)sbuf.st_size, MYF(0));
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
parse_delimiter(tmp_string, &create_statements, delimiter[0]);
......@@ -1411,9 +1412,9 @@ get_options(int *argc,char ***argv)
fprintf(stderr,"%s: Could not open query supplied file\n", my_progname);
exit(1);
}
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
tmp_string= (char *)my_malloc((size_t)sbuf.st_size + 1,
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
my_read(data_file, (uchar*) tmp_string, (size_t)sbuf.st_size, MYF(0));
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
if (user_supplied_query)
......@@ -1442,9 +1443,9 @@ get_options(int *argc,char ***argv)
fprintf(stderr,"%s: Could not open query supplied file\n", my_progname);
exit(1);
}
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
tmp_string= (char *)my_malloc((size_t)sbuf.st_size + 1,
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
my_read(data_file, (uchar*) tmp_string, (size_t)sbuf.st_size, MYF(0));
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
if (user_supplied_pre_statements)
......@@ -1473,9 +1474,9 @@ get_options(int *argc,char ***argv)
fprintf(stderr,"%s: Could not open query supplied file\n", my_progname);
exit(1);
}
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
tmp_string= (char *)my_malloc((size_t)sbuf.st_size + 1,
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
my_read(data_file, (uchar*) tmp_string, (size_t)sbuf.st_size, MYF(0));
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
if (user_supplied_post_statements)
......
This diff is collapsed.
......@@ -31,9 +31,9 @@ static char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length);
LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
{
LINE_BUFFER *line_buff;
MY_STAT input_file_stat;
#ifndef __WIN__
MY_STAT input_file_stat;
if (my_fstat(fileno(file), &input_file_stat, MYF(MY_WME)) ||
MY_S_ISDIR(input_file_stat.st_mode) ||
MY_S_ISBLK(input_file_stat.st_mode))
......@@ -56,6 +56,7 @@ char *batch_readline(LINE_BUFFER *line_buff)
{
char *pos;
ulong out_length;
LINT_INIT(out_length);
if (!(pos=intern_read_line(line_buff, &out_length)))
return 0;
......
......@@ -481,11 +481,11 @@ uint32 String::numchars()
return str_charset->cset->numchars(str_charset, Ptr, Ptr+str_length);
}
int String::charpos(int i,uint32 offset)
int String::charpos(longlong i,uint32 offset)
{
if (i <= 0)
return i;
return str_charset->cset->charpos(str_charset,Ptr+offset,Ptr+str_length,i);
return (int)i;
return (int)str_charset->cset->charpos(str_charset,Ptr+offset,Ptr+str_length,(size_t)i);
}
int String::strstr(const String &s,uint32 offset)
......
#ifndef CLIENT_SQL_STRING_INCLUDED
#define CLIENT_SQL_STRING_INCLUDED
#ifndef SQL_STRING_INCLUDED
#define SQL_STRING_INCLUDED
/* Copyright (C) 2000 MySQL AB
......@@ -268,7 +268,7 @@ class String
friend int stringcmp(const String *a,const String *b);
friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
uint32 numchars();
int charpos(int i,uint32 offset=0);
int charpos(longlong i,uint32 offset=0);
int reserve(uint32 space_needed)
{
......@@ -357,4 +357,4 @@ class String
}
};
#endif /* CLIENT_SQL_STRING_INCLUDED */
#endif /* SQL_STRING_INCLUDED */
......@@ -54,7 +54,7 @@ MACRO(GET_MYSQL_VERSION)
ENDIF()
SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
MESSAGE("-- MySQL ${VERSION}")
MESSAGE("-- MariaDB ${VERSION}")
SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
STRING(REPLACE "-" "_" MYSQL_RPM_VERSION "${VERSION}")
......@@ -92,15 +92,15 @@ IF(NOT CPACK_PACKAGE_FILE_NAME)
ENDIF()
IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
ENDIF()
SET(CPACK_PACKAGE_CONTACT "MySQL Build Team <build@mysql.com>")
SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
SET(CPACK_PACKAGE_CONTACT "MariaDB team <info@montyprogram.com>")
SET(CPACK_PACKAGE_VENDOR "Monty Program AB")
SET(CPACK_SOURCE_GENERATOR "TGZ")
INCLUDE(cpack_source_ignore_files)
# Defintions for windows version resources
SET(PRODUCTNAME "MySQL Server")
SET(PRODUCTNAME "MariaDB Server")
SET(COMPANYNAME ${CPACK_PACKAGE_VENDOR})
# Windows 'date' command has unpredictable output, so cannot rely on it to
......@@ -117,6 +117,10 @@ ENDIF()
# Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
# for more info.
IF(MSVC)
# Tiny version is used to identify the build, it can be set with cmake -DTINY_VERSION=<number>
# to bzr revno for example (in the CI builds)
SET(TINY_VERSION "0" CACHE INTERNAL "")
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
SET(FILETYPE VFT_APP)
......
......@@ -88,7 +88,7 @@ IF(MSVC)
# Fix CMake's predefined huge stack size
FOREACH(type EXE SHARED MODULE)
STRING(REGEX REPLACE "/STACK:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS "${CMAKE_${type}_LINKER_FLAGS}")
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
ENDFOREACH()
# Mark 32 bit executables large address aware so they can
......
......@@ -88,6 +88,13 @@ IF(NOT VERSION)
SET(DEFAULT_MACHINE "universal")
ELSE()
SET(DEFAULT_MACHINE "${CMAKE_OSX_ARCHITECTURES}")
IF(NOT DEFAULT_MACHINE)
IF(CMAKE_SIZEOF_VOIPD EQUAL 4)
SET(DEFAULT_MACHINE "i386")
ELSE()
SET(DEFAULT_MACHINE "x86_64")
ENDIF()
ENDIF()
ENDIF()
IF(DEFAULT_MACHINE MATCHES "i386")
SET(DEFAULT_MACHINE "x86")
......@@ -116,7 +123,7 @@ IF(NOT VERSION)
SET(PRODUCT_TAG)
ENDIF()
SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
SET(package_name "mariadb${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
# Sometimes package suffix is added (something like "-icc-glibc23")
IF(PACKAGE_SUFFIX)
......
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS__WINDOWS32
......@@ -12,8 +12,8 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
END
END
BLOCK "VarFileInfo"
......
......@@ -673,8 +673,7 @@ fnprint (to_print)
w = wcwidth (wc);
width = (w >= 0) ? w : 1;
}
fwrite (s, 1, tlen, rl_outstream);
s += tlen;
s+= fwrite (s, 1, tlen, rl_outstream);
printed_len += width;
#else
putc (*s, rl_outstream);
......
......@@ -621,7 +621,8 @@ _rl_output_some_chars (string, count)
const char *string;
int count;
{
fwrite (string, 1, count, _rl_out_stream);
if (fwrite (string, 1, count, _rl_out_stream) != (size_t)count)
fprintf(stderr, "Write failed\n");
}
/* Move the cursor back. */
......
......@@ -1389,7 +1389,7 @@ static struct link *ListAddDel(struct link *head, const char *ctlp,
subdir=0;
while (ctlp < end && *ctlp != ',')
ctlp++;
len=ctlp-start;
len= (int) (ctlp-start);
if (start[len-1] == '/')
{
len--;
......@@ -2113,7 +2113,7 @@ static void DbugFlush(CODE_STATE *cs)
void _db_flush_()
{
CODE_STATE *cs= NULL;
CODE_STATE *cs;
get_code_state_or_return;
(void) fflush(cs->stack->out_file);
}
......
#!/usr/bin/perl
# Copyright (C) 2002 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
die "No files specified\n" unless $ARGV[0];
$ctags="exctags -x -f - --c-types=f -u";
......@@ -85,4 +70,3 @@ while($src=shift)
}
warn "All done!\n";
......@@ -31,24 +31,28 @@ IF(NOT CMAKE_CROSSCOMPILING)
TARGET_LINK_LIBRARIES(comp_err mysys)
ENDIF()
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h
${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys
COMMAND comp_err
--charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
--out-dir=${PROJECT_BINARY_DIR}/sql/share/
--header_file=${PROJECT_BINARY_DIR}/include/mysqld_error.h
--name_file=${PROJECT_BINARY_DIR}/include/mysqld_ername.h
--state_file=${PROJECT_BINARY_DIR}/include/sql_state.h
--in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt
DEPENDS ${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt
${CMAKE_CURRENT_SOURCE_DIR}/comp_err.c)
# Generate mysqld_error.h
# Try not to change its timestamp if not necessary(as touching
# mysqld_error.h results in rebuild of the almost whole server)
# To preserve timestamp, first generate a temp header file, then copy it
# to mysqld_error.h using cmake -E copy_if_different
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp
COMMAND comp_err
--charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
--out-dir=${CMAKE_BINARY_DIR}/sql/share/
--header_file=${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp
--name_file=${CMAKE_BINARY_DIR}/include/mysqld_ername.h.tmp
--state_file=${CMAKE_BINARY_DIR}/include/sql_state.h.tmp
--in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp ${CMAKE_BINARY_DIR}/include/mysqld_error.h
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/mysqld_ername.h.tmp ${CMAKE_BINARY_DIR}/include/mysqld_ername.h
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/sql_state.h.tmp ${CMAKE_BINARY_DIR}/include/sql_state.h
DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt)
ADD_CUSTOM_TARGET(GenError
ALL
DEPENDS
${PROJECT_BINARY_DIR}/include/mysqld_error.h
${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys
${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt)
${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp)
MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
TARGET_LINK_LIBRARIES(my_print_defaults mysys)
......@@ -77,4 +81,3 @@ IF(UNIX)
MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c)
TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
ENDIF()
......@@ -34,6 +34,7 @@
#define HEADER_LENGTH 32 /* Length of header in errmsg.sys */
#define DEFAULT_CHARSET_DIR "../sql/share/charsets"
#define ER_PREFIX "ER_"
#define ER_PREFIX2 "MARIA_ER_"
#define WARN_PREFIX "WARN_"
static char *OUTFILE= (char*) "errmsg.sys";
static char *HEADERFILE= (char*) "mysqld_error.h";
......@@ -57,7 +58,7 @@ const char *empty_string= ""; /* For empty states */
*/
const char *default_language= "eng";
int er_offset= 1000;
uint er_offset= 1000;
my_bool info_flag= 0;
/* Storage of one error message row (for one language) */
......@@ -85,7 +86,7 @@ struct languages
struct errors
{
const char *er_name; /* Name of the error (ER_HASHCK) */
int d_code; /* Error code number */
uint d_code; /* Error code number */
const char *sql_code1; /* sql state */
const char *sql_code2; /* ODBC state */
struct errors *next_error; /* Pointer to next error */
......@@ -127,6 +128,7 @@ static struct my_option my_long_options[]=
};
static struct errors *generate_empty_message(uint dcode);
static struct languages *parse_charset_string(char *str);
static struct errors *parse_error_string(char *ptr, int er_count);
static struct message *parse_message_string(struct message *new_message,
......@@ -225,7 +227,7 @@ static int create_header_files(struct errors *error_head)
struct errors *tmp_error;
struct message *er_msg;
const char *er_text;
uint current_d_code;
DBUG_ENTER("create_header_files");
if (!(er_definef= my_fopen(HEADERFILE, O_WRONLY, MYF(MY_WME))))
......@@ -250,13 +252,22 @@ static int create_header_files(struct errors *error_head)
fprintf(er_definef, "#define ER_ERROR_FIRST %d\n", error_head->d_code);
current_d_code= error_head->d_code -1;
for (tmp_error= error_head; tmp_error; tmp_error= tmp_error->next_error)
{
/*
generating mysqld_error.h
fprintf() will automatically add \r on windows
*/
fprintf(er_definef, "#define %s %d\n", tmp_error->er_name,
if (!tmp_error->er_name)
continue; /* Placeholder for gap */
if (tmp_error->d_code > current_d_code + 1)
fprintf(er_definef, "\n/* New section */\n\n");
current_d_code= tmp_error->d_code;
fprintf(er_definef, "#define %s %u\n", tmp_error->er_name,
tmp_error->d_code);
er_last= tmp_error->d_code;
......@@ -428,7 +439,8 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
char *str, buff[1000];
struct errors *current_error= 0, **tail_error= top_error;
struct message current_message;
int rcount= 0;
uint rcount= 0;
my_bool er_offset_found= 0;
DBUG_ENTER("parse_input_file");
*top_error= 0;
......@@ -449,11 +461,32 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
}
if (is_prefix(str, "start-error-number"))
{
if (!(er_offset= parse_error_offset(str)))
uint tmp_er_offset;
if (!(tmp_er_offset= parse_error_offset(str)))
{
fprintf(stderr, "Failed to parse the error offset string!\n");
DBUG_RETURN(0);
}
if (!er_offset_found)
{
er_offset_found= 1;
er_offset= tmp_er_offset;
}
else
{
/* Create empty error messages between er_offset and tmp_err_offset */
if (tmp_er_offset < er_offset + rcount)
{
fprintf(stderr, "new start-error-number %u is smaller than current error message: %u\n", tmp_er_offset, er_offset + rcount);
DBUG_RETURN(0);
}
for ( ; er_offset + rcount < tmp_er_offset ; rcount++)
{
current_error= generate_empty_message(er_offset + rcount);
*tail_error= current_error;
tail_error= &current_error->next_error;
}
}
continue;
}
if (is_prefix(str, "default-language"))
......@@ -500,7 +533,8 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
DBUG_RETURN(0);
continue;
}
if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX))
if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX) ||
is_prefix(str, ER_PREFIX2))
{
if (!(current_error= parse_error_string(str, rcount)))
{
......@@ -515,12 +549,12 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
continue;
}
if (*str == '#' || *str == '\n')
continue; /* skip comment or empty lines */
continue; /* skip comment or empty lines */
fprintf(stderr, "Wrong input file format. Stop!\nLine: %s\n", str);
DBUG_RETURN(0);
}
*tail_error= 0; /* Mark end of list */
*tail_error= 0; /* Mark end of list */
my_fclose(file, MYF(0));
DBUG_RETURN(rcount);
......@@ -629,7 +663,6 @@ static struct message *find_message(struct errors *err, const char *lang,
DBUG_RETURN(tmp);
if (!strcmp(tmp->lang_short_name, default_language))
{
DBUG_ASSERT(tmp->text[0] != 0);
return_val= tmp;
}
}
......@@ -849,6 +882,33 @@ static struct message *parse_message_string(struct message *new_message,
}
static struct errors *generate_empty_message(uint d_code)
{
struct errors *new_error;
struct message message;
/* create a new element */
if (!(new_error= (struct errors *) my_malloc(sizeof(*new_error),
MYF(MY_WME))))
return(0);
if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 1))
return(0); /* OOM: Fatal error */
new_error->er_name= NULL;
new_error->d_code= d_code;
new_error->sql_code1= empty_string;
new_error->sql_code2= empty_string;
if (!(message.lang_short_name= my_strdup(default_language, MYF(MY_WME))) ||
!(message.text= my_strdup("", MYF(MY_WME))))
return(0);
/* Can't fail as msg is preallocated */
(void) insert_dynamic(&new_error->msg, (uchar*) &message);
return(new_error);
}
/*
Parsing the string with error name and codes; returns the pointer to
the errors struct
......@@ -861,7 +921,9 @@ static struct errors *parse_error_string(char *str, int er_count)
DBUG_PRINT("enter", ("str: %s", str));
/* create a new element */
new_error= (struct errors *) my_malloc(sizeof(*new_error), MYF(MY_WME));
if (!(new_error= (struct errors *) my_malloc(sizeof(*new_error),
MYF(MY_WME))))
DBUG_RETURN(0);
if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0))
DBUG_RETURN(0); /* OOM: Fatal error */
......@@ -991,7 +1053,7 @@ static struct languages *parse_charset_string(char *str)
static void print_version(void)
{
DBUG_ENTER("print_version");
printf("%s (Compile errormessage) Ver %s\n", my_progname, "2.0");
printf("%s (Compile errormessage) Ver %s\n", my_progname, "3.0");
DBUG_VOID_RETURN;
}
......
......@@ -2,7 +2,9 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/extra/libevent
${CMAKE_SOURCE_DIR}/extra/libevent/compat
${CMAKE_SOURCE_DIR}/extra/libevent/WIN32-Code
${CMAKE_SOURCE_DIR}/include)
${CMAKE_BINARY_DIR}/extra/libevent
${CMAKE_SOURCE_DIR}/include
)
IF(MSVC)
ADD_DEFINITIONS("-DWIN32 -DHAVE_CONFIG_H")
......@@ -28,8 +30,14 @@ SET(LIBEVENT_SOURCES
min_heap.h
strlcpy-internal.h
)
IF(WIN32)
# Workaround source distribution bug, remove preconfigured event-config
IF(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
FILE(REMOVE ${CMAKE_SOURCE_DIR}/extra/libevent/event-config.h)
ENDIF()
CONFIGURE_FILE(WIN32-Code/config.h ${CMAKE_BINARY_DIR}/extra/libevent/event-config.h COPYONLY)
ENDIF()
CONFIGURE_FILE(WIN32-Code/config.h ${CMAKE_SOURCE_DIR}/extra/libevent/event-config.h COPYONLY)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(libevent ${LIBEVENT_SOURCES})
ENDIF(NOT SOURCE_SUBLIBS)
......@@ -185,7 +185,7 @@ devpoll_init(struct event_base *base)
}
static int
devpoll_recalc(struct event_base *base, void *arg, int max)
devpoll_recalc(struct event_base *base __attribute__((unused)), void *arg, int max)
{
struct devpollop *devpollop = arg;
......
......@@ -155,8 +155,8 @@ epoll_init(struct event_base *base)
}
static int
epoll_recalc(struct event_base *base __attribute__((unused)),
void *arg, int max)
epoll_recalc(struct event_base *base __attribute__((unused)), void *arg,
int max)
{
struct epollop *epollop = arg;
......
......@@ -75,8 +75,10 @@ bufferevent_add(struct event *ev, int timeout)
*/
void
bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old __attribute__((unused)), size_t now,
void *arg) {
bufferevent_read_pressure_cb(struct evbuffer *buf,
size_t old __attribute__((unused)), size_t now,
void *arg)
{
struct bufferevent *bufev = arg;
/*
* If we are below the watermark then reschedule reading if it's
......
......@@ -405,7 +405,7 @@ event_loopexit_cb(int fd __attribute__((unused)),
int
event_loopexit(struct timeval *tv)
{
return (event_once(-1, EV_TIMEOUT, event_loopexit_cb,
return (event_once(-1, EV_TIMEOUT, &event_loopexit_cb,
current_base, tv));
}
......
......@@ -95,7 +95,7 @@ const struct eventop kqops = {
};
static void *
kq_init(struct event_base *base)
kq_init(struct event_base *base __attribute__((unused)))
{
int kq;
struct kqop *kqueueop;
......@@ -203,13 +203,14 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
}
static void
kq_sighandler(int sig)
kq_sighandler(int sig __attribute__((unused)))
{
/* Do nothing here */
}
static int
kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
kq_dispatch(struct event_base *base __attribute__((unused)), void *arg,
struct timeval *tv)
{
struct kqop *kqop = arg;
struct kevent *changes = kqop->changes;
......@@ -408,7 +409,7 @@ kq_del(void *arg, struct event *ev)
}
static void
kq_dealloc(struct event_base *base, void *arg)
kq_dealloc(struct event_base *base __attribute__((unused)), void *arg)
{
struct kqop *kqop = arg;
......
......@@ -69,7 +69,8 @@ static void evsignal_handler(int sig);
/* Callback for when the signal handler write a byte to our signaling socket */
static void
evsignal_cb(int fd, short what __attribute__((unused)), void *arg __attribute__((unused)))
evsignal_cb(int fd, short what __attribute__((unused)),
void *arg __attribute__((unused)))
{
static char signals[100];
#ifdef WIN32
......@@ -113,7 +114,7 @@ evsignal_init(struct event_base *base)
evutil_make_socket_nonblocking(base->sig.ev_signal_pair[0]);
event_set(&base->sig.ev_signal, base->sig.ev_signal_pair[1],
EV_READ | EV_PERSIST, evsignal_cb, &base->sig.ev_signal);
EV_READ | EV_PERSIST, &evsignal_cb, &base->sig.ev_signal);
base->sig.ev_signal.ev_base = base;
base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL;
}
......
......@@ -101,7 +101,7 @@ static void usage(my_bool version)
my_print_help(my_long_options);
my_print_default_files(config_file);
my_print_variables(my_long_options);
printf("\nExample usage:\n%s --defaults-file=example.cnf client mysql\n", my_progname);
printf("\nExample usage:\n%s --defaults-file=example.cnf client client-server mysql\n", my_progname);
}
......
......@@ -1086,7 +1086,7 @@ static int convert_file(REPLACE *rep, char * name)
my_fclose(in,MYF(0)); my_fclose(out,MYF(0));
if (updated && ! error)
my_redel(org_name,tempname,MYF(MY_WME | MY_LINK_WARNING));
my_redel(org_name, tempname, 0, MYF(MY_WME | MY_LINK_WARNING));
else
my_delete(tempname,MYF(MY_WME));
if (!silent && ! error)
......
......@@ -21,6 +21,9 @@
* with SSL types and sockets
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h> // memcpy
#include "runtime.hpp"
......
......@@ -128,7 +128,7 @@ void SetErrorString(unsigned long error, char* buffer)
break;
case badVersion_error :
strncpy(buffer, "protocl version mismatch", max);
strncpy(buffer, "protocol version mismatch", max);
break;
case compress_error :
......
/*
Copyright (C) 2006, 2007 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301 USA.
*/
// benchmark.cpp
// TaoCrypt benchmark
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <stdio.h>
......
......@@ -110,7 +110,7 @@ public:
word32 size(bool use_current = false);
private:
void put(Source&);
size_t put(Source&);
FileSink(const FileSink&); // hide
FileSink& operator=(const FileSink&); // hide
......
......@@ -98,9 +98,9 @@ FileSink::~FileSink()
// fill source from file sink
void FileSink::put(Source& source)
size_t FileSink::put(Source& source)
{
fwrite(source.get_buffer(), 1, source.size(), file_);
return fwrite(source.get_buffer(), 1, source.size(), file_);
}
......
/*
Copyright (C) 2006, 2007 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301 USA.
*/
// test.cpp
// test taocrypt functionality
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <stdio.h>
......
......@@ -30,6 +30,8 @@ SET(HEADERS_ABI
mysql/plugin.h
mysql/plugin_audit.h
mysql/plugin_ftparser.h
mysql/plugin_auth.h
mysql/client_plugin.h
)
SET(HEADERS
......
......@@ -32,14 +32,14 @@ int internal_str2dec(const char *from, decimal_t *to, char **end,
int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals,
char filler);
int decimal2ulonglong(decimal_t *from, ulonglong *to);
int decimal2ulonglong(const decimal_t *from, ulonglong *to);
int ulonglong2decimal(ulonglong from, decimal_t *to);
int decimal2longlong(decimal_t *from, longlong *to);
int decimal2longlong(const decimal_t *from, longlong *to);
int longlong2decimal(longlong from, decimal_t *to);
int decimal2double(const decimal_t *from, double *to);
int double2decimal(double from, decimal_t *to);
int decimal_actual_fraction(decimal_t *from);
int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
int decimal2bin(const decimal_t *from, uchar *to, int precision, int scale);
int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale);
int decimal_size(int precision, int scale);
......
......@@ -25,6 +25,8 @@
extern "C" {
#endif
#include <my_compare.h>
#define HA_FT_MAXBYTELEN 254
#define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)
......
......@@ -136,6 +136,8 @@ typedef struct st_heap_share
ulong min_records,max_records; /* Params to open */
ulonglong data_length,index_length,max_table_size;
uint key_stat_version; /* version to indicate insert/delete */
uint key_version; /* Updated on key change */
uint file_version; /* Update on clear */
uint records; /* records */
uint blength; /* records rounded up to 2^n */
uint deleted; /* Deleted records in database */
......@@ -171,6 +173,8 @@ typedef struct st_heap_info
enum ha_rkey_function last_find_flag;
TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
TREE_ELEMENT **last_pos;
uint key_version; /* Version at last read */
uint file_version; /* Version at scan */
uint lastkey_len;
my_bool implicit_emptied;
THR_LOCK_DATA lock;
......
......@@ -163,7 +163,8 @@ enum my_lex_states
MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
MY_LEX_IDENT_OR_KEYWORD,
MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
MY_LEX_STRING_OR_DELIMITER
MY_LEX_STRING_OR_DELIMITER, MY_LEX_MINUS_OR_COMMENT, MY_LEX_PLACEHOLDER,
MY_LEX_COMMA
};
struct charset_info_st;
......@@ -389,6 +390,9 @@ extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2);
extern void my_hash_sort_bin(CHARSET_INFO *cs,
const uchar *key, size_t len, ulong *nr1,
ulong *nr2);
extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length);
......
......@@ -90,6 +90,12 @@ extern const char _dig_vec_lower[];
extern char *strmov_overlapp(char *dest, const char *src);
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
#define LINT_INIT_STRUCT(var) bzero(&var, sizeof(var)) /* No uninitialize-warning */
#else
#define LINT_INIT_STRUCT(var)
#endif
/* Prototypes for string functions */
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
......@@ -215,75 +221,6 @@ struct st_mysql_const_unsigned_lex_string
};
typedef struct st_mysql_const_unsigned_lex_string LEX_CUSTRING;
/* SPACE_INT is a word that contains only spaces */
#if SIZEOF_INT == 4
#define SPACE_INT 0x20202020
#elif SIZEOF_INT == 8
#define SPACE_INT 0x2020202020202020
#else
#error define the appropriate constant for a word full of spaces
#endif
/**
Skip trailing space.
On most systems reading memory in larger chunks (ideally equal to the size of
the chinks that the machine physically reads from memory) causes fewer memory
access loops and hence increased performance.
This is why the 'int' type is used : it's closest to that (according to how
it's defined in C).
So when we determine the amount of whitespace at the end of a string we do
the following :
1. We divide the string into 3 zones :
a) from the start of the string (__start) to the first multiple
of sizeof(int) (__start_words)
b) from the end of the string (__end) to the last multiple of sizeof(int)
(__end_words)
c) a zone that is aligned to sizeof(int) and can be safely accessed
through an int *
2. We start comparing backwards from (c) char-by-char. If all we find is
space then we continue
3. If there are elements in zone (b) we compare them as unsigned ints to a
int mask (SPACE_INT) consisting of all spaces
4. Finally we compare the remaining part (a) of the string char by char.
This covers for the last non-space unsigned int from 3. (if any)
This algorithm works well for relatively larger strings, but it will slow
the things down for smaller strings (because of the additional calculations
and checks compared to the naive method). Thus the barrier of length 20
is added.
@param ptr pointer to the input string
@param len the length of the string
@return the last non-space character
*/
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
}
static inline void lex_string_set(LEX_STRING *lex_str, const char *c_str)
{
lex_str->str= (char *) c_str;
......
/* Copyright (c) 2011, Monty Program Ab
Copyright (c) 2011, Oleksandr Byelkin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
#ifndef ma_dyncol_h
#define ma_dyncol_h
#include <decimal.h>
#include <my_decimal_limits.h>
#include <mysql_time.h>
/*
Max length for data in a dynamic colums. This comes from how the
how the offset are stored.
*/
#define MAX_DYNAMIC_COLUMN_LENGTH 0X1FFFFFFFL
/* NO and OK is the same used just to show semantics */
#define ER_DYNCOL_NO ER_DYNCOL_OK
enum enum_dyncol_func_result
{
ER_DYNCOL_OK= 0,
ER_DYNCOL_YES= 1, /* For functions returning 0/1 */
ER_DYNCOL_FORMAT= -1, /* Wrong format of the encoded string */
ER_DYNCOL_LIMIT= -2, /* Some limit reached */
ER_DYNCOL_RESOURCE= -3, /* Out of resourses */
ER_DYNCOL_DATA= -4, /* Incorrect input data */
ER_DYNCOL_UNKNOWN_CHARSET= -5 /* Unknown character set */
};
typedef DYNAMIC_STRING DYNAMIC_COLUMN;
enum enum_dynamic_column_type
{
DYN_COL_NULL= 0,
DYN_COL_INT,
DYN_COL_UINT,
DYN_COL_DOUBLE,
DYN_COL_STRING,
DYN_COL_DECIMAL,
DYN_COL_DATETIME,
DYN_COL_DATE,
DYN_COL_TIME
};
typedef enum enum_dynamic_column_type DYNAMIC_COLUMN_TYPE;
struct st_dynamic_column_value
{
DYNAMIC_COLUMN_TYPE type;
union
{
long long long_value;
unsigned long long ulong_value;
double double_value;
struct {
LEX_STRING string_value;
CHARSET_INFO *charset;
};
struct {
decimal_digit_t decimal_buffer[DECIMAL_BUFF_LENGTH];
decimal_t decimal_value;
};
MYSQL_TIME time_value;
};
};
typedef struct st_dynamic_column_value DYNAMIC_COLUMN_VALUE;
enum enum_dyncol_func_result
dynamic_column_create(DYNAMIC_COLUMN *str,
uint column_nr, DYNAMIC_COLUMN_VALUE *value);
enum enum_dyncol_func_result
dynamic_column_create_many(DYNAMIC_COLUMN *str,
uint column_count,
uint *column_numbers,
DYNAMIC_COLUMN_VALUE *values);
enum enum_dyncol_func_result
dynamic_column_update(DYNAMIC_COLUMN *org, uint column_nr,
DYNAMIC_COLUMN_VALUE *value);
enum enum_dyncol_func_result
dynamic_column_update_many(DYNAMIC_COLUMN *str,
uint add_column_count,
uint *column_numbers,
DYNAMIC_COLUMN_VALUE *values);
enum enum_dyncol_func_result
dynamic_column_delete(DYNAMIC_COLUMN *org, uint column_nr);
enum enum_dyncol_func_result
dynamic_column_exists(DYNAMIC_COLUMN *org, uint column_nr);
/* List of not NULL columns */
enum enum_dyncol_func_result
dynamic_column_list(DYNAMIC_COLUMN *org, DYNAMIC_ARRAY *array_of_uint);
/*
if the column do not exists it is NULL
*/
enum enum_dyncol_func_result
dynamic_column_get(DYNAMIC_COLUMN *org, uint column_nr,
DYNAMIC_COLUMN_VALUE *store_it_here);
#define dynamic_column_initialize(A) memset((A), 0, sizeof(*(A)))
#define dynamic_column_column_free(V) dynstr_free(V)
/***************************************************************************
Internal functions, don't use if you don't know what you are doing...
***************************************************************************/
#define dynamic_column_reassociate(V,P,L, A) dynstr_reassociate((V),(P),(L),(A))
#define dynamic_column_value_init(V) (V)->type= DYN_COL_NULL
/*
Prepare value for using as decimal
*/
void dynamic_column_prepare_decimal(DYNAMIC_COLUMN_VALUE *value);
#endif
......@@ -430,7 +430,8 @@ int maria_repair_by_sort(HA_CHECK *param, MARIA_HA *info,
int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
const char *name, my_bool rep_quick);
int maria_change_to_newfile(const char *filename, const char *old_ext,
const char *new_ext, myf myflags);
const char *new_ext, time_t backup_time,
myf myflags);
void maria_lock_memory(HA_CHECK *param);
int maria_update_state_info(HA_CHECK *param, MARIA_HA *info, uint update);
void maria_update_key_parts(MARIA_KEYDEF *keyinfo, double *rec_per_key_part,
......
......@@ -36,10 +36,15 @@
#ifndef __attribute__
# if !defined(__GNUC__)
# define __attribute__(A)
# elif GCC_VERSION < 2008
# define __attribute__(A)
# elif defined(__cplusplus) && GCC_VERSION < 3004
# define __attribute__(A)
# else
# ifndef GCC_VERSION
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
# endif
# if GCC_VERSION < 2008
# define __attribute__(A)
# elif defined(__cplusplus) && GCC_VERSION < 3004
# define __attribute__(A)
# endif
# endif
#endif
......
......@@ -461,7 +461,9 @@ enum ha_base_keytype {
#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
#define HA_ERR_INDEX_COL_TOO_LONG 178 /* Index column length exceeds limit */
#define HA_ERR_ROW_NOT_VISIBLE 179
#define HA_ERR_LAST 179 /* Copy of last error nr */
#define HA_ERR_ABORTED_BY_USER 180
#define HA_ERR_DISK_FULL 181
#define HA_ERR_LAST 181 /* Copy of last error nr */
/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
......@@ -535,7 +537,7 @@ enum en_fieldtype {
};
enum data_file_type {
STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD
STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD, NO_RECORD
};
/* For key ranges */
......@@ -558,11 +560,13 @@ typedef struct st_key_range
enum ha_rkey_function flag;
} key_range;
typedef void *range_id_t;
typedef struct st_key_multi_range
{
key_range start_key;
key_range end_key;
char *ptr; /* Free to use by caller (ptr to row etc) */
range_id_t ptr; /* Free to use by caller (ptr to row etc) */
uint range_flag; /* key range flags see above */
} KEY_MULTI_RANGE;
......
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates.
Copyright (c) 2009-2011, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
Copyright (c) 2009-2011, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2011, Oracle and/or its affiliates.
Copyright (c) Monty Program Ab; 1991-2011
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -61,22 +62,22 @@ typedef struct st_HA_KEYSEG /* Key-portion */
} HA_KEYSEG;
#define get_key_length(length,key) \
{ if (*(uchar*) (key) != 255) \
length= (uint) *(uchar*) ((key)++); \
{ if (*(const uchar*) (key) != 255) \
length= (uint) *(const uchar*) ((key)++); \
else \
{ length= mi_uint2korr((key)+1); (key)+=3; } \
}
#define get_key_length_rdonly(length,key) \
{ if (*(uchar*) (key) != 255) \
length= ((uint) *(uchar*) ((key))); \
{ if (*(const uchar*) (key) != 255) \
length= ((uint) *(const uchar*) ((key))); \
else \
{ length= mi_uint2korr((key)+1); } \
}
#define get_key_pack_length(length,length_pack,key) \
{ if (*(uchar*) (key) != 255) \
{ length= (uint) *(uchar*) ((key)++); length_pack= 1; }\
{ if (*(const uchar*) (key) != 255) \
{ length= (uint) *(const uchar*) ((key)++); length_pack= 1; }\
else \
{ length=mi_uint2korr((key)+1); (key)+= 3; length_pack= 3; } \
}
......
#ifndef MY_COMPILER_INCLUDED
#define MY_COMPILER_INCLUDED
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2010, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
/* Copyright (c) 2000 MySQL AB & 2009 Monty Program Ab
/* Copyright (c) 2009-2011 Monty Program Ab
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
......@@ -14,16 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef MY_DBUG_INCLUDED
#define MY_DBUG_INCLUDED
#ifndef _my_dbug_h
#define _my_dbug_h
#ifndef __WIN__
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <signal.h>
#endif /* not __WIN__ */
......@@ -96,7 +90,7 @@ extern void _db_free_(void *ptr);
#define DBUG_END() _db_end_ ()
#define DBUG_LOCK_FILE _db_lock_file_()
#define DBUG_UNLOCK_FILE _db_unlock_file_()
#define DBUG_ASSERT(A) assert(A)
#define DBUG_ASSERT(A) do { _db_flush_(); assert(A); } while(0)
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
......@@ -104,6 +98,7 @@ extern void _db_free_(void *ptr);
#define DBUG_MALLOC(SIZE) _db_malloc_(SIZE)
#define DBUG_REALLOC(PTR,SIZE) _db_realloc_(PTR,SIZE)
#define DBUG_FREE(PTR) _db_free_(PTR)
#define IF_DBUG(A,B) A
#ifndef __WIN__
#define DBUG_ABORT() (_db_flush_(), abort())
......@@ -118,15 +113,6 @@ extern void _db_free_(void *ptr);
(void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
_exit(3))
#endif
#define DBUG_CHECK_CRASH(func, op) \
do { char _dbuf_[255]; strxnmov(_dbuf_, sizeof(_dbuf_)-1, (func), (op)); \
DBUG_EXECUTE_IF(_dbuf_, DBUG_ABORT()); } while(0)
#define DBUG_CRASH_ENTER(func) \
DBUG_ENTER(func); DBUG_CHECK_CRASH(func, "_crash_enter")
#define DBUG_CRASH_RETURN(val) \
DBUG_CHECK_CRASH(_db_get_func_(), "_crash_return")
#define DBUG_CRASH_VOID_RETURN \
DBUG_CHECK_CRASH (_db_get_func_(), "_crash_return")
/*
Make the program fail, without creating a core file.
......@@ -173,6 +159,7 @@ extern void _db_suicide_();
#define DBUG_MALLOC(SIZE) malloc(SIZE)
#define DBUG_REALLOC(PTR,SIZE) realloc(PTR,SIZE)
#define DBUG_FREE(PTR) free(PTR)
#define IF_DBUG(A,B) B
#define DBUG_ABORT() do { } while(0)
#define DBUG_CRASH_ENTER(func)
#define DBUG_CRASH_RETURN(val) do { return(val); } while(0)
......@@ -200,4 +187,4 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
}
#endif
#endif /* MY_DBUG_INCLUDED */
#endif /* _my_dbug_h */
#ifndef MY_DECIMAL_LIMITS_INCLUDED
#define MY_DECIMAL_LIMITS_INCLUDED
/* Copyright (c) 2011 Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define DECIMAL_LONGLONG_DIGITS 22
#define DECIMAL_LONG_DIGITS 10
#define DECIMAL_LONG3_DIGITS 8
/** maximum length of buffer in our big digits (uint32). */
#define DECIMAL_BUFF_LENGTH 9
/* the number of digits that my_decimal can possibly contain */
#define DECIMAL_MAX_POSSIBLE_PRECISION (DECIMAL_BUFF_LENGTH * 9)
/**
maximum guaranteed precision of number in decimal digits (number of our
digits * number of decimal digits in one our big digit - number of decimal
digits in one our big digit decreased by 1 (because we always put decimal
point on the border of our big digits))
*/
#define DECIMAL_MAX_PRECISION (DECIMAL_MAX_POSSIBLE_PRECISION - 8*2)
#define DECIMAL_MAX_SCALE 30
#define DECIMAL_NOT_SPECIFIED 31
/**
maximum length of string representation (number of maximum decimal
digits + 1 position for sign + 1 position for decimal point)
*/
#define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_POSSIBLE_PRECISION + 2)
#endif /* MY_DECIMAL_LIMITS_INCLUDED */
......@@ -753,10 +753,10 @@ inline unsigned long long my_double2ulonglong(double d)
#define strtok_r(A,B,C) strtok((A),(B))
#endif
/* This is from the old m-machine.h file */
#if SIZEOF_LONG_LONG > 4
#if SIZEOF_LONG_LONG >= 8
#define HAVE_LONG_LONG 1
#else
#error WHAT? sizeof(long long) < 8 ???
#endif
/*
......
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc,
2010-2011 Oracle and/or its affiliates, 2009-2010 Monty Program Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -85,37 +86,11 @@ typedef volatile LONG my_pthread_once_t;
#define MY_PTHREAD_ONCE_INPROGRESS 1
#define MY_PTHREAD_ONCE_DONE 2
/*
Struct and macros to be used in combination with the
windows implementation of pthread_cond_timedwait
*/
/*
Declare a union to make sure FILETIME is properly aligned
so it can be used directly as a 64 bit value. The value
stored is in 100ns units.
*/
union ft64 {
FILETIME ft;
__int64 i64;
};
struct timespec {
union ft64 tv;
/* The max timeout value in millisecond for pthread_cond_timedwait */
long max_timeout_msec;
time_t tv_sec;
long tv_nsec;
};
#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \
(ABSTIME).tv.i64= (TIME)+(__int64)(NSEC)/100; \
(ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
} while(0)
#define set_timespec_nsec(ABSTIME,NSEC) do { \
union ft64 tv; \
GetSystemTimeAsFileTime(&tv.ft); \
set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC)); \
} while(0)
/**
Compare two timespec structs.
......@@ -413,7 +388,7 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
#ifndef set_timespec_nsec
#define set_timespec_nsec(ABSTIME,NSEC) \
set_timespec_time_nsec((ABSTIME),my_getsystime(),(NSEC))
set_timespec_time_nsec((ABSTIME), my_hrtime().val*1000 + (NSEC))
#endif /* !set_timespec_nsec */
/* adapt for two different flavors of struct timespec */
......@@ -443,11 +418,10 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
#endif /* !cmp_timespec */
#ifndef set_timespec_time_nsec
#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \
ulonglong nsec= (NSEC); \
ulonglong now= (TIME) + (nsec/100); \
(ABSTIME).MY_tv_sec= (now / ULL(10000000)); \
(ABSTIME).MY_tv_nsec= (now % ULL(10000000) * 100 + (nsec % 100)); \
#define set_timespec_time_nsec(ABSTIME,NSEC) do { \
ulonglong now= (NSEC); \
(ABSTIME).MY_tv_sec= (now / 1000000000ULL); \
(ABSTIME).MY_tv_nsec= (now % 1000000000ULL); \
} while(0)
#endif /* !set_timespec_time_nsec */
......
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -38,6 +38,7 @@ typedef struct my_aio_result {
#ifdef _WIN32
#include <malloc.h> /*for alloca*/
#endif
#include <mysql/plugin.h>
#define MY_INIT(name) { my_progname= name; my_init(); }
......@@ -142,6 +143,9 @@ typedef struct my_aio_result {
#define GETDATE_GMT 8
#define GETDATE_FIXEDLENGTH 16
/* Extra length needed for filename if one calls my_create_backup_name */
#define MY_BACKUP_NAME_EXTRA_LENGTH 17
/* defines when allocating data */
extern void *my_malloc(size_t Size,myf MyFlags);
extern void *my_multi_malloc(myf MyFlags, ...);
......@@ -171,7 +175,7 @@ extern void my_large_free(uchar *ptr);
#define my_large_free(A) my_free_lock((A))
#endif /* HAVE_LARGE_PAGES */
#ifdef HAVE_ALLOCA
#if defined(HAVE_ALLOCA) && !defined(HAVE_valgrind)
#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
#pragma alloca
#endif /* _AIX */
......@@ -209,7 +213,7 @@ extern void (*fatal_error_handler_hook)(uint my_err, const char *str,
extern uint my_file_limit;
extern ulong my_thread_stack_size;
extern const char *(*proc_info_hook)(void *, const char *, const char *,
extern const char *(*proc_info_hook)(MYSQL_THD, const char *, const char *,
const char *, const unsigned int);
#ifdef HAVE_LARGE_PAGES
......@@ -314,9 +318,6 @@ struct st_my_file_info
int oflag; /* open flags, e.g O_APPEND */
#endif
enum file_type type;
#if !defined(HAVE_PREAD) && !defined(_WIN32)
mysql_mutex_t mutex;
#endif
};
extern struct st_my_file_info *my_file_info;
......@@ -528,6 +529,8 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
#define my_b_tell(info) ((info)->pos_in_file + \
(size_t) (*(info)->current_pos - (info)->request_pos))
#define my_b_write_tell(info) ((info)->pos_in_file + \
((info)->write_pos - (info)->write_buffer))
#define my_b_get_buffer_start(info) (info)->request_pos
#define my_b_get_bytes_in_buffer(info) (char*) (info)->read_end - \
......@@ -651,7 +654,10 @@ extern void my_message(uint my_err, const char *str,myf MyFlags);
extern void my_message_stderr(uint my_err, const char *str, myf MyFlags);
extern my_bool my_init(void);
extern void my_end(int infoflag);
extern int my_redel(const char *from, const char *to, int MyFlags);
extern int my_redel(const char *from, const char *to, time_t backup_time_stamp,
myf MyFlags);
void my_create_backup_name(char *to, const char *from,
time_t backup_time_stamp);
extern int my_copystat(const char *from, const char *to, int MyFlags);
extern char * my_filename(File fd);
......@@ -796,6 +802,8 @@ extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
extern void dynstr_free(DYNAMIC_STRING *str);
extern void dynstr_reassociate(DYNAMIC_STRING *str, char **res, size_t *length,
size_t *alloc_length);
#ifdef HAVE_MLOCK
extern void *my_malloc_lock(size_t length,myf flags);
extern void my_free_lock(void *ptr);
......@@ -861,15 +869,23 @@ extern ulong crc32(ulong crc, const uchar *buf, uint len);
extern uint my_set_max_open_files(uint files);
void my_free_open_file_info(void);
extern time_t my_time(myf flags);
extern ulonglong my_getsystime(void);
extern ulonglong my_getcputime(void);
extern ulonglong my_micro_time();
extern ulonglong my_micro_time_and_time(time_t *time_arg);
time_t my_time_possible_from_micro(ulonglong microtime);
extern my_bool my_gethwaddr(uchar *to);
extern int my_getncpus();
#define HRTIME_RESOLUTION 1000000ULL /* microseconds */
typedef struct {ulonglong val;} my_hrtime_t;
void my_time_init();
extern my_hrtime_t my_hrtime();
extern ulonglong my_interval_timer(void);
extern ulonglong my_getcputime(void);
#define microsecond_interval_timer() (my_interval_timer()/1000)
#define hrtime_to_time(X) ((X).val/HRTIME_RESOLUTION)
#define hrtime_from_time(X) ((ulonglong)((X)*HRTIME_RESOLUTION))
#define hrtime_to_double(X) ((X).val/(double)HRTIME_RESOLUTION)
#define hrtime_sec_part(X) ((ulong)((X).val % HRTIME_RESOLUTION))
#define my_time(X) hrtime_to_time(my_hrtime())
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
......
......@@ -45,7 +45,7 @@ typedef long my_time_t;
#define TIMESTAMP_MAX_YEAR 2038
#define TIMESTAMP_MIN_YEAR (1900 + YY_PART_YEAR - 1)
#define TIMESTAMP_MAX_VALUE INT_MAX32
#define TIMESTAMP_MIN_VALUE 1
#define TIMESTAMP_MIN_VALUE 0
/* two-digit years < this are 20..; >= this are 19.. */
#define YY_PART_YEAR 70
......@@ -66,6 +66,7 @@ typedef long my_time_t;
/* Flags to str_to_datetime */
#define TIME_FUZZY_DATE 1
#define TIME_DATETIME_ONLY 2
#define TIME_TIME_ONLY 4
/* Must be same as MODE_NO_ZERO_IN_DATE */
#define TIME_NO_ZERO_IN_DATE (65536L*2*2*2*2*2*2*2)
/* Must be same as MODE_NO_ZERO_DATE */
......@@ -79,28 +80,46 @@ typedef long my_time_t;
#define TIME_MAX_HOUR 838
#define TIME_MAX_MINUTE 59
#define TIME_MAX_SECOND 59
#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \
TIME_MAX_SECOND)
#define TIME_MAX_SECOND_PART 999999
#define TIME_SECOND_PART_FACTOR (TIME_MAX_SECOND_PART+1)
#define TIME_SECOND_PART_DIGITS 6
#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + TIME_MAX_SECOND)
#define TIME_MAX_VALUE_SECONDS (TIME_MAX_HOUR * 3600L + \
TIME_MAX_MINUTE * 60L + TIME_MAX_SECOND)
my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
ulonglong flags, int *was_cut);
enum enum_mysql_timestamp_type
str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
ulong flag, int *warning);
enum enum_mysql_timestamp_type
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
ulonglong flags, int *was_cut);
longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
ulonglong flags, int *was_cut);
static inline
longlong double_to_datetime(double nr, MYSQL_TIME *ltime, uint flags, int *cut)
{
if (nr < 0 || nr > LONGLONG_MAX)
nr= (double)LONGLONG_MAX;
return number_to_datetime((longlong) floor(nr),
(ulong)((nr-floor(nr))*TIME_SECOND_PART_FACTOR),
ltime, flags, cut);
}
int number_to_time(my_bool neg, longlong nr, ulong sec_part,
MYSQL_TIME *ltime, int *was_cut);
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong(const MYSQL_TIME *);
double TIME_to_double(const MYSQL_TIME *my_time);
longlong pack_time(MYSQL_TIME *my_time);
MYSQL_TIME *unpack_time(longlong packed, MYSQL_TIME *my_time);
my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
int *warning);
int check_time_range(struct st_mysql_time *, int *warning);
int check_time_range(struct st_mysql_time *my_time, uint dec, int *warning);
long calc_daynr(uint year,uint month,uint day);
uint calc_days_in_year(uint year);
......@@ -133,8 +152,7 @@ static inline my_bool validate_timestamp_range(const MYSQL_TIME *t)
}
my_time_t
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone,
my_bool *in_dst_time_gap);
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, uint *error_code);
void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
......@@ -147,11 +165,28 @@ void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
sent using binary protocol fit in this buffer.
*/
#define MAX_DATE_STRING_REP_LENGTH 30
#define AUTO_SEC_PART_DIGITS 31 /* same as NOT_FIXED_DEC */
int my_time_to_str(const MYSQL_TIME *l_time, char *to);
int my_time_to_str(const MYSQL_TIME *l_time, char *to, uint digits);
int my_date_to_str(const MYSQL_TIME *l_time, char *to);
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
int my_TIME_to_str(const MYSQL_TIME *l_time, char *to);
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to, uint digits);
int my_TIME_to_str(const MYSQL_TIME *l_time, char *to, uint digits);
static inline longlong sec_part_shift(longlong second_part, uint digits)
{
return second_part / (longlong)log_10_int[TIME_SECOND_PART_DIGITS - digits];
}
static inline longlong sec_part_unshift(longlong second_part, uint digits)
{
return second_part * (longlong)log_10_int[TIME_SECOND_PART_DIGITS - digits];
}
static inline ulong sec_part_truncate(ulong second_part, uint digits)
{
/* the cast here should be unnecessary! */
return second_part - second_part % (ulong)log_10_int[TIME_SECOND_PART_DIGITS - digits];
}
#define hrtime_to_my_time(X) ((my_time_t)hrtime_to_time(X))
/*
Available interval types used in any statement.
......
......@@ -31,7 +31,17 @@ extern "C" {
#define tree_set_pointer(element,ptr) *((uchar **) (element+1))=((uchar*) (ptr))
/*
A tree with its flag set to TREE_ONLY_DUPS behaves differently on inserting
an element that is not in the tree:
the element is not added at all, but instead tree_insert() returns a special
address TREE_ELEMENT_UNIQUE as an indication that the function has not failed
due to lack of memory.
*/
#define TREE_ELEMENT_UNIQUE ((TREE_ELEMENT *) 1)
#define TREE_NO_DUPS 1
#define TREE_ONLY_DUPS 2
typedef enum { left_root_right, right_root_left } TREE_WALK;
typedef uint32 element_count;
......
......@@ -290,6 +290,8 @@ extern int mi_is_changed(struct st_myisam_info *info);
extern int mi_delete_all_rows(struct st_myisam_info *info);
extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
extern uint mi_get_pointer_length(ulonglong file_length, uint def);
extern int mi_make_backup_of_index(struct st_myisam_info *info,
time_t backup_time, myf flags);
#define MEMMAP_EXTRA_MARGIN 7 /* Write this as a suffix for mmap file */
/* this is used to pass to mysql_myisamchk_table */
......@@ -382,7 +384,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
const char * name, int rep_quick);
int change_to_newfile(const char * filename, const char * old_ext,
const char * new_ext, myf myflags);
const char * new_ext, time_t backup_time, myf myflags);
int lock_file(HA_CHECK *param, File file, my_off_t start, int lock_type,
const char *filetype, const char *filename);
void lock_memory(HA_CHECK *param);
......
......@@ -74,7 +74,7 @@
#define TT_USEFRM 1
#define TT_FOR_UPGRADE 2
#define O_NEW_INDEX 1 /* Bits set in out_flag */
/* Bits set in out_flag */
#define O_NEW_DATA 2
#define O_DATA_LOST 4
......@@ -141,6 +141,7 @@ typedef struct st_handler_check_param
ulonglong use_buffers; /* Used as param to getopt() */
size_t read_buffer_length, write_buffer_length;
size_t sort_buffer_length, sort_key_blocks;
time_t backup_time; /* To sign backup files */
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
uint out_flag, warning_printed, error_printed, verbose;
......@@ -154,6 +155,11 @@ typedef struct st_handler_check_param
char temp_filename[FN_REFLEN];
IO_CACHE read_cache;
enum_handler_stats_method stats_method;
/* For reporting progress */
uint stage, max_stage;
uint progress_counter; /* How often to call _report_progress() */
ulonglong progress, max_progress;
mysql_mutex_t print_msg_mutex;
my_bool need_print_msg_lock;
} HA_CHECK;
......
......@@ -166,7 +166,8 @@ enum mysql_option
MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH,
MYSQL_PROGRESS_CALLBACK
};
/**
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,6 +22,7 @@ extern "C" {
#include <mysql/service_thd_alloc.h>
#include <mysql/service_thd_wait.h>
#include <mysql/service_thread_scheduler.h>
#include <mysql/service_progress_report.h>
#ifdef __cplusplus
}
......
......@@ -51,7 +51,6 @@ void thd_lock_thread_count(THD *thd);
void thd_unlock_thread_count(THD *thd);
void thd_close_connection(THD *thd);
THD *thd_get_current_thd();
void thd_new_connection_setup(THD *thd, char *stack_start);
void thd_lock_data(THD *thd);
void thd_unlock_data(THD *thd);
bool thd_is_transaction_active(THD *thd);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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