├── extra └── yassl │ ├── NEWS │ ├── AUTHORS │ ├── ChangeLog │ ├── testsuite │ └── quit │ ├── examples │ └── echoclient │ │ └── quit │ ├── lib │ └── dummy │ ├── certs │ ├── dsa512.der │ ├── client-key.der │ ├── client-cert.der │ ├── dh1024.dat │ ├── dsa512.pem │ ├── ca-key.pem │ ├── client-key.pem │ ├── server-key.pem │ ├── server-keyEnc.pem │ ├── client-keyEnc.pem │ └── client-keyEnc3.pem │ ├── taocrypt │ ├── benchmark │ │ ├── dh1024.der │ │ ├── dsa1024.der │ │ ├── rsa1024.der │ │ └── make.bat │ ├── certs │ │ └── dh1024.dat │ ├── test.dsw │ ├── test │ │ └── make.bat │ ├── src │ │ └── aestables.cpp │ ├── include │ │ └── kernelc.hpp │ ├── README │ └── taocrypt.dsw │ ├── src │ └── dummy.cpp │ └── include │ ├── openssl │ ├── des.h │ ├── hmac.h │ ├── md4.h │ ├── pem.h │ ├── sha.h │ ├── x509.h │ ├── des_old.h │ ├── objects.h │ ├── rand.h │ ├── x509v3.h │ ├── lhash.h │ ├── prefix_crypto.h │ ├── engine.h │ ├── pkcs12.h │ ├── md5.h │ ├── err.h │ ├── rsa.h │ ├── evp.h │ ├── opensslv.h │ ├── transport_types.h │ └── crypto.h │ └── timer.hpp ├── sql-bench ├── pwd.bat ├── uname.bat ├── crash-me.sh ├── server-cfg.sh ├── Data │ └── ATIS │ │ ├── restrict_class.txt │ │ ├── transport.txt │ │ ├── day_name.txt │ │ ├── month_name.txt │ │ ├── time_interval.txt │ │ ├── time_zone.txt │ │ ├── airport_service.txt │ │ ├── city.txt │ │ ├── airport.txt │ │ ├── code_description.txt │ │ ├── ground_service.txt │ │ └── class_of_service.txt ├── limits │ ├── mysql-4.0.cfg │ └── mysql-4.1.cfg ├── Comments │ ├── postgres.benchmark │ ├── interbase │ └── Informix.crash-me ├── example.bat └── example ├── sql ├── message.rc ├── sql_lex.cc ├── MSG00001.bin ├── item_xmlfunc.cc ├── add_errmsg ├── message.mc ├── udf_example.def ├── ndb_share.cc ├── sql_rewrite.h ├── hash_filo.cc ├── frm_crypt.h ├── sql_binlog.h ├── ndb_global_schema_lock.h ├── sql_help.h ├── sql_manager.h ├── main.cc ├── init.h ├── sql_do.h ├── sql_tablespace.h ├── discover.h ├── ptosc.h ├── custom_conf.h ├── derror.h ├── sql_rename.h ├── sql_reload.h ├── string_service.h ├── sql_union.h ├── ndb_global_schema_lock_guard.h ├── examples │ └── CMakeLists.txt ├── sql_delete.h ├── sql_builtin.cc.in ├── frm_crypt.cc └── mysqld_suffix.h ├── cmake ├── configurable_file_content.in ├── os │ ├── Cygwin.cmake │ ├── OS400.cmake │ └── FreeBSD.cmake ├── check_minimal_version.cmake ├── cat.cmake ├── tags.cmake ├── stack_direction.c ├── cpu_info.cmake └── info_bin.cmake ├── libmysql └── libmysql.ver.in ├── zlib ├── ChangeLog ├── inffast.h ├── README.MySQL └── CMakeLists.txt ├── Docs ├── mysql.info ├── INFO_SRC └── linuxthreads.txt ├── strings ├── decimal.c ├── string.doc ├── ctype-czech.c ├── ctype-latin1.c ├── is_prefix.c ├── bmove_upp.c ├── strnlen.c ├── strfill.c ├── strnmov.c └── strcend.c ├── libmysqld ├── libmysqld.rc └── resource.h ├── VERSION ├── BUILD-CMAKE ├── packaging ├── WiX │ ├── AdminHeader.jpg │ ├── MySQLServer.ico │ ├── AdminBackground.jpg │ ├── mysqlcommandlineshell.ico │ └── ca │ │ └── CustomAction.def └── rpm-uln │ ├── filter-requires-mysql.sh │ ├── README.mysql-docs │ ├── generate-tarball.sh │ ├── my.cnf │ ├── README-ULN │ ├── mysql-embedded-check.c │ ├── mysql-5.5-errno.patch │ ├── scriptstub.c │ ├── my_config.h │ ├── mysql-5.5-testing.patch │ ├── mysql-5.5-mtr1.patch │ └── mysql-5.5-libdir.patch ├── vio ├── docs │ ├── INSTALL │ └── TODO └── CMakeLists.txt ├── cmd-line-utils └── libedit │ ├── config.h │ ├── historyn.c │ ├── tokenizern.c │ └── np │ └── wcsdup.c ├── dbug ├── example1.c ├── example3.c ├── example2.c ├── monty.doc ├── factorial.c ├── main.c ├── remove_function_from_trace.pl ├── my_main.c └── CMakeLists.txt ├── libevent ├── WIN32-Code │ └── misc.h ├── autogen.sh ├── sample │ ├── Makefile.am │ └── signal-test.c ├── test │ ├── regress.rpc │ ├── test-init.c │ └── Makefile.am ├── strlcpy-internal.h └── README ├── man ├── mysqltest_embedded.1 ├── mysql_client_test_embedded.1 └── mysqlman.1 ├── support-files ├── build-tags ├── magic ├── mysql-log-rotate.sh ├── MacOSX │ ├── mwar-wrapper │ ├── postflight.sh │ └── StartupParameters.plist.sh ├── my-default.cnf.sh ├── mysqld_multi.server.sh └── binary-configure.sh ├── regex ├── regerror.ih ├── debug.ih ├── cclass.h ├── main.ih ├── utils.h ├── CHANGES ├── regfree.c ├── COPYRIGHT ├── CMakeLists.txt └── README ├── INSTALL-WIN-SOURCE ├── include ├── mysql │ ├── client_authentication.h │ ├── psi │ │ ├── psi_abi_v0.h │ │ ├── psi_abi_v2.h │ │ └── psi_abi_v1.h │ ├── services.h │ └── get_password.h ├── mysql_version.h.in ├── probes_mysql.h ├── crypt_genhash_impl.h ├── service_versions.h ├── my_rnd.h ├── sha1.h ├── my_user.h ├── mysql_embed.h └── my_libwrap.h ├── BUILD ├── compile-pentium ├── compile-pentium-debug ├── compile-pentium-debug-max ├── compile-pentium-gcov ├── compile-pentium-gprof ├── compile-pentium-debug-max-no-ndb ├── compile-pentium64 ├── compile-pentium-valgrind-max-no-ndb ├── autorun.sh ├── compile-pentium-valgrind-max ├── compile-dist └── cmake_configure.sh ├── mysys ├── mf_qsort2.c ├── my_crc32.c ├── my_isnan.c ├── my_getpagesize.c ├── my_alarm.c ├── mf_unixpath.c ├── my_div.c ├── checksum.c ├── my_libwrap.c ├── my_timer_cycles.il └── my_mess.c ├── unittest ├── mytap │ ├── CMakeLists.txt │ └── t │ │ ├── CMakeLists.txt │ │ └── basic-t.c ├── gunit │ ├── sql_string-t.cc │ ├── client_string-t.cc │ └── mock_field_datetime.h └── examples │ ├── skip-t.c │ ├── core-t.c │ ├── todo-t.c │ └── skip_all-t.c └── inception_build.sh /extra/yassl/NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /extra/yassl/AUTHORS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /extra/yassl/ChangeLog: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /extra/yassl/testsuite/quit: -------------------------------------------------------------------------------- 1 | quit 2 | 3 | -------------------------------------------------------------------------------- /sql-bench/pwd.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | @cd 3 | -------------------------------------------------------------------------------- /sql-bench/uname.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | @ver 3 | -------------------------------------------------------------------------------- /extra/yassl/examples/echoclient/quit: -------------------------------------------------------------------------------- 1 | quit 2 | 3 | -------------------------------------------------------------------------------- /extra/yassl/lib/dummy: -------------------------------------------------------------------------------- 1 | // this is a dummy file 2 | -------------------------------------------------------------------------------- /sql/message.rc: -------------------------------------------------------------------------------- 1 | LANGUAGE 0x9,0x1 2 | 1 11 MSG00001.bin 3 | -------------------------------------------------------------------------------- /cmake/configurable_file_content.in: -------------------------------------------------------------------------------- 1 | @CMAKE_CONFIGURABLE_FILE_CONTENT@ 2 | -------------------------------------------------------------------------------- /libmysql/libmysql.ver.in: -------------------------------------------------------------------------------- 1 | libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; 2 | -------------------------------------------------------------------------------- /sql/sql_lex.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql/sql_lex.cc -------------------------------------------------------------------------------- /zlib/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/zlib/ChangeLog -------------------------------------------------------------------------------- /Docs/mysql.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/Docs/mysql.info -------------------------------------------------------------------------------- /sql/MSG00001.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql/MSG00001.bin -------------------------------------------------------------------------------- /strings/decimal.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/strings/decimal.c -------------------------------------------------------------------------------- /sql/item_xmlfunc.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql/item_xmlfunc.cc -------------------------------------------------------------------------------- /strings/string.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/strings/string.doc -------------------------------------------------------------------------------- /libmysqld/libmysqld.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/libmysqld/libmysqld.rc -------------------------------------------------------------------------------- /sql-bench/crash-me.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql-bench/crash-me.sh -------------------------------------------------------------------------------- /strings/ctype-czech.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/strings/ctype-czech.c -------------------------------------------------------------------------------- /strings/ctype-latin1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/strings/ctype-latin1.c -------------------------------------------------------------------------------- /sql-bench/server-cfg.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql-bench/server-cfg.sh -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | MYSQL_VERSION_MAJOR=5 2 | MYSQL_VERSION_MINOR=6 3 | MYSQL_VERSION_PATCH=10 4 | MYSQL_VERSION_EXTRA= 5 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/restrict_class.txt: -------------------------------------------------------------------------------- 1 | 'AP/2','B7NR' 2 | 'AP/2','BW7NR' 3 | 'AP/2','BWE14' 4 | 'AP/2','YAP14' 5 | -------------------------------------------------------------------------------- /BUILD-CMAKE: -------------------------------------------------------------------------------- 1 | The latest information about building MySQL with CMake is located on 2 | http://forge.mysql.com/wiki/CMake -------------------------------------------------------------------------------- /extra/yassl/certs/dsa512.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/extra/yassl/certs/dsa512.der -------------------------------------------------------------------------------- /packaging/WiX/AdminHeader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/packaging/WiX/AdminHeader.jpg -------------------------------------------------------------------------------- /packaging/WiX/MySQLServer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/packaging/WiX/MySQLServer.ico -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/transport.txt: -------------------------------------------------------------------------------- 1 | 'L','LIMOUSINE' 2 | 'T','TAXI' 3 | 'R','RENTAL CAR' 4 | 'A','AIR TAXI OPERATION' 5 | -------------------------------------------------------------------------------- /extra/yassl/certs/client-key.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/extra/yassl/certs/client-key.der -------------------------------------------------------------------------------- /sql-bench/limits/mysql-4.0.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql-bench/limits/mysql-4.0.cfg -------------------------------------------------------------------------------- /sql-bench/limits/mysql-4.1.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql-bench/limits/mysql-4.1.cfg -------------------------------------------------------------------------------- /extra/yassl/certs/client-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/extra/yassl/certs/client-cert.der -------------------------------------------------------------------------------- /packaging/WiX/AdminBackground.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/packaging/WiX/AdminBackground.jpg -------------------------------------------------------------------------------- /sql-bench/Comments/postgres.benchmark: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/sql-bench/Comments/postgres.benchmark -------------------------------------------------------------------------------- /vio/docs/INSTALL: -------------------------------------------------------------------------------- 1 | As the Vio is currently used only as part of MySQL, separate 2 | installation isn't currently supported. 3 | 4 | -------------------------------------------------------------------------------- /cmd-line-utils/libedit/config.h: -------------------------------------------------------------------------------- 1 | #include "my_config.h" 2 | #include "sys.h" 3 | #ifndef NARROW_WRAPPER 4 | #define WIDECHAR 5 | #endif 6 | -------------------------------------------------------------------------------- /packaging/WiX/mysqlcommandlineshell.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/packaging/WiX/mysqlcommandlineshell.ico -------------------------------------------------------------------------------- /extra/yassl/taocrypt/benchmark/dh1024.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/extra/yassl/taocrypt/benchmark/dh1024.der -------------------------------------------------------------------------------- /extra/yassl/taocrypt/benchmark/dsa1024.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/extra/yassl/taocrypt/benchmark/dsa1024.der -------------------------------------------------------------------------------- /extra/yassl/taocrypt/benchmark/rsa1024.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanchuanchuan/inception/HEAD/extra/yassl/taocrypt/benchmark/rsa1024.der -------------------------------------------------------------------------------- /packaging/rpm-uln/filter-requires-mysql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /usr/lib/rpm/perl.req $* | grep -v -e "perl(th" -e "perl(lib::mtr" -e "perl(mtr" 4 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/day_name.txt: -------------------------------------------------------------------------------- 1 | 1,'MONDAY' 2 | 2,'TUESDAY' 3 | 3,'WEDNESDAY' 4 | 4,'THURSDAY' 5 | 5,'FRIDAY' 6 | 6,'SATURDAY' 7 | 7,'SUNDAY' 8 | -------------------------------------------------------------------------------- /cmd-line-utils/libedit/historyn.c: -------------------------------------------------------------------------------- 1 | #define NARROW_WRAPPER 2 | #include "config.h" 3 | #undef WIDECHAR 4 | #define NARROWCHAR 5 | #include "./history.c" 6 | -------------------------------------------------------------------------------- /cmd-line-utils/libedit/tokenizern.c: -------------------------------------------------------------------------------- 1 | #define NARROW_WRAPPER 2 | #include "config.h" 3 | #undef WIDECHAR 4 | #define NARROWCHAR 5 | #include "./tokenizer.c" 6 | -------------------------------------------------------------------------------- /packaging/WiX/ca/CustomAction.def: -------------------------------------------------------------------------------- 1 | LIBRARY "wixca" 2 | VERSION 1.0 3 | 4 | EXPORTS 5 | 6 | RemoveService 7 | RemoveServiceNoninteractive 8 | TestService 9 | -------------------------------------------------------------------------------- /extra/yassl/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | To make libtool always use a C++ linker when compiling with yaSSL we need 3 | to add a dummy C++ file to the source list. 4 | */ 5 | -------------------------------------------------------------------------------- /vio/docs/TODO: -------------------------------------------------------------------------------- 1 | * Consistent error handling. May be the initialization should 2 | be taken out of constructors and be put into virtual method open(). 3 | * The open() method is named very misleadingly(). 4 | -------------------------------------------------------------------------------- /packaging/rpm-uln/README.mysql-docs: -------------------------------------------------------------------------------- 1 | The official MySQL documentation is not freely redistributable, so we cannot 2 | include it in RHEL or Fedora. You can find it on-line at 3 | 4 | http://dev.mysql.com/doc/ 5 | -------------------------------------------------------------------------------- /dbug/example1.c: -------------------------------------------------------------------------------- 1 | main (argc, argv) 2 | int argc; 3 | char *argv[]; 4 | { 5 | printf ("argv[0] = %d\n", argv[0]); 6 | /* 7 | * Rest of program 8 | */ 9 | printf ("== done ==\n"); 10 | } 11 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/month_name.txt: -------------------------------------------------------------------------------- 1 | 1,'JANUARY' 2 | 2,'FEBRUARY' 3 | 3,'MARCH' 4 | 4,'APRIL' 5 | 5,'MAY' 6 | 6,'JUNE' 7 | 7,'JULY' 8 | 8,'AUGUST' 9 | 9,'SEPTEMBER' 10 | 10,'OCTOBER' 11 | 11,'NOVEMBER' 12 | 12,'DECEMBER' 13 | -------------------------------------------------------------------------------- /libevent/WIN32-Code/misc.h: -------------------------------------------------------------------------------- 1 | #ifndef MISC_H 2 | #define MISC_H 3 | 4 | struct timezone; 5 | struct timeval; 6 | 7 | #ifndef HAVE_GETTIMEOFDAY 8 | int gettimeofday(struct timeval *,struct timezone *); 9 | #endif 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Docs/INFO_SRC: -------------------------------------------------------------------------------- 1 | revision-id: marc.alff@oracle.com-20130122163423-rhqem20gdpde41rf 2 | date: 2013-01-22 17:34:23 +0100 3 | build-date: 2013-01-22 17:45:07 +0100 4 | revno: 4805 5 | branch-nick: mysql-5.6.10-release 6 | 7 | MySQL source 5.6.10 8 | -------------------------------------------------------------------------------- /libevent/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LIBTOOLIZE=libtoolize 3 | SYSNAME=`uname` 4 | if [ "x$SYSNAME" = "xDarwin" ] ; then 5 | LIBTOOLIZE=glibtoolize 6 | fi 7 | aclocal && \ 8 | autoheader && \ 9 | $LIBTOOLIZE && \ 10 | autoconf && \ 11 | automake --add-missing --copy 12 | -------------------------------------------------------------------------------- /dbug/example3.c: -------------------------------------------------------------------------------- 1 | main (argc, argv) 2 | int argc; 3 | char *argv[]; 4 | { 5 | # ifdef DEBUG 6 | printf ("argv[0] = %d\n", argv[0]); 7 | # endif 8 | /* 9 | * Rest of program 10 | */ 11 | # ifdef DEBUG 12 | printf ("== done ==\n"); 13 | # endif 14 | } 15 | -------------------------------------------------------------------------------- /extra/yassl/certs/dh1024.dat: -------------------------------------------------------------------------------- 1 | 30818702818100DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F020102 -------------------------------------------------------------------------------- /man/mysqltest_embedded.1: -------------------------------------------------------------------------------- 1 | .so mysqltest.1 2 | .SH "SEE ALSO" 3 | For more information, please refer to the MySQL Reference Manual, 4 | which may already be installed locally and which is also available 5 | online at http://dev.mysql.com/doc/. 6 | .SH AUTHOR 7 | Oracle Corporation (http://dev.mysql.com/). 8 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/certs/dh1024.dat: -------------------------------------------------------------------------------- 1 | 30818702818100DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F020102 -------------------------------------------------------------------------------- /man/mysql_client_test_embedded.1: -------------------------------------------------------------------------------- 1 | .so mysql_client_test.1 2 | .SH "SEE ALSO" 3 | For more information, please refer to the MySQL Reference Manual, 4 | which may already be installed locally and which is also available 5 | online at http://dev.mysql.com/doc/. 6 | .SH AUTHOR 7 | Oracle Corporation (http://dev.mysql.com/). 8 | -------------------------------------------------------------------------------- /packaging/rpm-uln/generate-tarball.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VERSION=$1 4 | 5 | rm -rf mysql-$VERSION 6 | 7 | tar xfz mysql-$VERSION.tar.gz || exit 1 8 | 9 | rm mysql-$VERSION/Docs/mysql.info 10 | 11 | tar cfz mysql-$VERSION-nodocs.tar.gz mysql-$VERSION || exit 1 12 | 13 | rm -rf mysql-$VERSION 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /packaging/rpm-uln/my.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | datadir=/var/lib/mysql 3 | socket=/var/lib/mysql/mysql.sock 4 | user=mysql 5 | # Disabling symbolic-links is recommended to prevent assorted security risks 6 | symbolic-links=0 7 | 8 | [mysqld_safe] 9 | log-error=/var/log/mysqld.log 10 | pid-file=/var/run/mysqld/mysqld.pid 11 | -------------------------------------------------------------------------------- /dbug/example2.c: -------------------------------------------------------------------------------- 1 | int debug = 0; 2 | 3 | main (argc, argv) 4 | int argc; 5 | char *argv[]; 6 | { 7 | /* printf ("argv = %x\n", argv) */ 8 | if (debug) printf ("argv[0] = %d\n", argv[0]); 9 | /* 10 | * Rest of program 11 | */ 12 | #ifdef DEBUG 13 | printf ("== done ==\n"); 14 | #endif 15 | } 16 | -------------------------------------------------------------------------------- /sql-bench/example.bat: -------------------------------------------------------------------------------- 1 | REM 2 | REM Example use to run test on PC 3 | REM One need only to run 'comapre-results' to view results from old runs 4 | 5 | perl run-all-tests --server mysql --cmp "access,mysql" 6 | perl run-all-tests --server mysql --cmp "access,mysql" --log --use-old-results 7 | perl compare-results --cmp "access,mysql" -rel 8 | -------------------------------------------------------------------------------- /support-files/build-tags: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | rm -f TAGS 4 | filter='\.cpp$\|\.cc$\|\.c$\|\.h$\|\.yy$\|\.hpp$' 5 | 6 | list="find . -type f" 7 | bzr root >/dev/null 2>/dev/null && list="bzr ls --from-root -R --kind=file --versioned" 8 | 9 | $list |grep $filter |while read f; 10 | do 11 | etags -o TAGS --append $f 12 | done 13 | -------------------------------------------------------------------------------- /regex/regerror.ih: -------------------------------------------------------------------------------- 1 | /* ========= begin header generated by ./mkh ========= */ 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | /* === regerror.c === */ 7 | static char *regatoi(const my_regex_t *preg, char *localbuf); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | /* ========= end header generated by ./mkh ========= */ 13 | -------------------------------------------------------------------------------- /dbug/monty.doc: -------------------------------------------------------------------------------- 1 | 2 | All changes that I or other people at MySQL AB have done to all files 3 | in the dbug library (Mainly in dbug.c, dbug_analyze.c, dbug_long.h, 4 | dbug.h) are put in public domain, as the rest of the dbug.c library) 5 | 6 | To my knowledge, all code in dbug library is in public domain. 7 | 8 | Michael Widenius 9 | 10 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/time_interval.txt: -------------------------------------------------------------------------------- 1 | 'morning',0000,1200 2 | 'afternoon',1200,1800 3 | 'evening',1800,2000 4 | 'day',600,1800 5 | 'night',1800,2400 6 | 'night',000,600 7 | 'early morning',0000,800 8 | 'mid-morning',800,1000 9 | 'late morning',1000,1200 10 | 'early afternoon',1200,1400 11 | 'mid-afternoon',1400,1600 12 | 'late afternoon',1600,1800 13 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/time_zone.txt: -------------------------------------------------------------------------------- 1 | 'HST','HAWAII/ALEUTIAN STANDARD TIME' 2 | 'AST','ALASKA STANDARD TIME' 3 | 'YST','YUKON STANDARD TIME' 4 | 'PST','PACIFIC STANDARD TIME' 5 | 'MST','MOUNTAIN STANDARD TIME' 6 | 'CST','CENTRAL STANDARD TIME' 7 | 'EST','EASTERN STANDARD TIME' 8 | 'AST','ATLANTIC STANDARD TIME' 9 | 'NST','NEWFOUNDLAND STANDARD TIME' 10 | -------------------------------------------------------------------------------- /INSTALL-WIN-SOURCE: -------------------------------------------------------------------------------- 1 | 2 | You can find information about how to install from a Windows source 3 | distributions at 4 | 5 | http://dev.mysql.com/doc/refman/5.5/en/source-installation.html 6 | 7 | The MySQL Reference Manual is also available in various formats on 8 | http://dev.mysql.com/doc; if you're interested in the DocBook XML 9 | sources go to http://svn.mysql.com. 10 | -------------------------------------------------------------------------------- /libevent/sample/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign no-dependencies 2 | 3 | LDADD = ../libevent.la 4 | AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat 5 | 6 | noinst_PROGRAMS = event-test time-test signal-test 7 | 8 | event_test_sources = event-test.c 9 | time_test_sources = time-test.c 10 | signal_test_sources = signal-test.c 11 | 12 | verify: 13 | 14 | DISTCLEANFILES = *~ 15 | -------------------------------------------------------------------------------- /sql/add_errmsg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test $# -ne 1 4 | then 5 | echo "Copies # error messages from share/english/errmsg.txt to other message files" 6 | echo "Usage: $0 number_of_messages_to_copy" 7 | exit 1; 8 | fi 9 | 10 | FILE=/tmp/add.$$ 11 | tail -$1 share/english/errmsg-utf8.txt > $FILE 12 | for i in `ls share/*/errmsg-utf8.txt | grep -v english` 13 | do 14 | cat $FILE >> $i 15 | done 16 | rm $FILE 17 | 18 | -------------------------------------------------------------------------------- /include/mysql/client_authentication.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIENT_AUTHENTICATION_H 2 | #define CLIENT_AUTHENTICATION_H 3 | #include 4 | #include "mysql.h" 5 | #include "mysql/client_plugin.h" 6 | 7 | C_MODE_START 8 | int sha256_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql); 9 | int sha256_password_init(char *, size_t, int, va_list); 10 | int sha256_password_deinit(void); 11 | C_MODE_END 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/airport_service.txt: -------------------------------------------------------------------------------- 1 | 'MATL','ATL',9.0,'S',45 2 | 'BBOS','BOS',3.0,'NE',30 3 | 'DDFW','DFW',13.0,'NW',70 4 | 'FDFW','DFW',17.0,'E',55 5 | 'DDEN','DEN',6.5,'NE',30 6 | 'PPHL','PHL',7.0,'SW',35 7 | 'PPIT','PIT',17.0,'W',55 8 | 'OOAK','OAK',10.0,'SE',15 9 | 'OOAK','SFO',24.0,'SW',60 10 | 'SSFO','SFO',8.0,'SE',30 11 | 'SSFO','OAK',18.0,'SE',60 12 | 'WWAS','BWI',32.0,'NE',50 13 | 'BBWI','BWI',10.0,'S',25 14 | '','',0.0,'',0 15 | -------------------------------------------------------------------------------- /extra/yassl/certs/dsa512.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PRIVATE KEY----- 2 | MIH3AgEAAkEAmSlpgMk8mGhFqYL+Z+uViMW0DNYmRZUZLKAgW37faencww/zYQol 3 | m/IhAWrNqow358pm21b0D3160Ri5Qv0bEQIVAK0lKasKnwkcwa0DIHZ/prfdTQMJ 4 | AkASiJna59ALk5vm7jwhf5yztI2ljOI3gD8X0YFPvfBxtjIIVN2/AeKzdwZkdYoE 5 | 1nk5sQIDA8YGdOWQBQoQRhkxAkAEhKAmMXIM6E9dUxdisYDKwBZfwx7qxdmYOPm+ 6 | VlNHaM4IIlccuw13kc9bNu3zJIKQis2QfNt3+Rctc3Pvu7mCAhQjg+e+aqykxwwc 7 | E2V27tjDFY02uA== 8 | -----END DSA PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /libevent/test/regress.rpc: -------------------------------------------------------------------------------- 1 | /* tests data packing and unpacking */ 2 | 3 | struct msg { 4 | string from_name = 1; 5 | string to_name = 2; 6 | optional struct[kill] attack = 3; 7 | array struct[run] run = 4; 8 | } 9 | 10 | struct kill { 11 | string weapon = 0x10121; 12 | string action = 2; 13 | optional int how_often = 3; 14 | } 15 | 16 | struct run { 17 | string how = 1; 18 | optional bytes some_bytes = 2; 19 | bytes fixed_bytes[24] = 3; 20 | } 21 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/city.txt: -------------------------------------------------------------------------------- 1 | 'MATL','ATLANTA','GA','USA','EST' 2 | 'BBOS','BOSTON','MA','USA','EST' 3 | 'DDFW','DALLAS','TX','USA','CST' 4 | 'FDFW','FORT WORTH','TX','USA','CST' 5 | 'DDEN','DENVER','CO','USA','MST' 6 | 'PPHL','PHILADELPHIA','PA','USA','EST' 7 | 'PPIT','PITTSBURGH','PA','USA','EST' 8 | 'SSFO','SAN FRANCISCO','CA','USA','PST' 9 | 'OOAK','OAKLAND','CA','USA','PST' 10 | 'WWAS','WASHINGTON','DC','USA','EST' 11 | 'BBWI','BALTIMORE','MD','USA','EST' 12 | -------------------------------------------------------------------------------- /zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /libevent/strlcpy-internal.h: -------------------------------------------------------------------------------- 1 | #ifndef _STRLCPY_INTERNAL_H_ 2 | #define _STRLCPY_INTERNAL_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifdef HAVE_CONFIG_H 9 | #include "config.h" 10 | #endif /* HAVE_CONFIG_H */ 11 | 12 | #ifndef HAVE_STRLCPY 13 | #include 14 | size_t _event_strlcpy(char *dst, const char *src, size_t siz); 15 | #define strlcpy _event_strlcpy 16 | #endif 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /libmysqld/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by libmysqld.rc 4 | // 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 101 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1000 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /zlib/README.MySQL: -------------------------------------------------------------------------------- 1 | This an incomplete version of the zlib library -- it excludes some of the 2 | platform-specific project files, contributed code, and examples from the 3 | original zlib distribution. You can find the original distribution at 4 | 5 | http://www.gzip.org/zlib/ 6 | or 7 | http://www.zlib.net/ 8 | 9 | Revision history: 10 | 11 | 20.01.2006. The following files were changed as part of #15787 fix: 12 | makefile.am 13 | gzio.c 14 | zconf.h 15 | README.mysql 16 | 17 | -------------------------------------------------------------------------------- /regex/debug.ih: -------------------------------------------------------------------------------- 1 | /* ========= begin header generated by ./mkh ========= */ 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | /* === debug.c === */ 7 | void regprint(my_regex_t *r, FILE *d); 8 | static void s_print(const CHARSET_INFO *charset, register struct re_guts *g, 9 | FILE *d); 10 | static char *regchar(const CHARSET_INFO *charset, int ch,char *buf); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | /* ========= end header generated by ./mkh ========= */ 16 | -------------------------------------------------------------------------------- /extra/yassl/certs/ca-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBOQIBAAJBAJcwuRqS7yVPykwRMZUa4cAQGQoguTeAGlc4Ak4bxQ8oT9rjyRaq 3 | UL1K+7dxxzXMY4HB3Z0z+TgWiDKgqlYjA6MCAwEAAQJAEQ9TY7c+uuQU/J5YDO4a 4 | mRR37tegbq3Kyxqrz+p8QuhqLDtVh13GaF7rVU70vyNHm+cgihUyzho/PViAkPBo 5 | qQIhAMU8/RDhDLgL5BxID4sxKIVBtg+imFSbyKVyg7oQLUcXAiEAxDu94O45Cf4a 6 | np9R0thumY/QqWpCkycWAB7fFEuaf1UCIEH+bg4/vqm2ENUFp23DPPOZUPlaRe3J 7 | UhFJh5mx3/RxAiBq++8vfHFYg1Lb/BxOCXVy/zdRxf753ytdcXdJx1Y56QIgVgpN 8 | FNfYJofQfWaP96sjlc0usrT28uceHx0QmHqolVc= 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /regex/cclass.h: -------------------------------------------------------------------------------- 1 | /* character-class table */ 2 | 3 | #define CCLASS_ALNUM 0 4 | #define CCLASS_ALPHA 1 5 | #define CCLASS_BLANK 2 6 | #define CCLASS_CNTRL 3 7 | #define CCLASS_DIGIT 4 8 | #define CCLASS_GRAPH 5 9 | #define CCLASS_LOWER 6 10 | #define CCLASS_PRINT 7 11 | #define CCLASS_PUNCT 8 12 | #define CCLASS_SPACE 9 13 | #define CCLASS_UPPER 10 14 | #define CCLASS_XDIGIT 11 15 | #define CCLASS_LAST 12 16 | 17 | extern struct cclass { 18 | const char *name; 19 | const char *chars; 20 | const char *multis; 21 | uint mask; 22 | } cclasses[]; 23 | -------------------------------------------------------------------------------- /extra/yassl/certs/client-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBPAIBAAJBAL1RShT9ahmEDDM4/CcynJcL/KQYYGlO2dh4UAvpIF3WHXAcDCSf 3 | I4LMOgHVlxeyc2yGz7Xx5c5oDNmiEjl88lMCAwEAAQJAVGHWLlLhpqvXsEEXCvWh 4 | HCYono+K8YVGzhiaPSTU212fCoQryIxsXQKGBjhFdZm96DZWp+Vd/t/u+B4ZeaqY 5 | +QIhAOBEfbFtdZqk5OmbbRsRVPI7+YYmubgY1TVIPqmxHQ4NAiEA2BrTQkjOb3ul 6 | A/SZO04fJUZsm7Ng92FWHDJsRancSd8CIQCmGbQqZBK1TamJZ6dAY+7RViAx/p6Q 7 | vjuzMeXPUrFdRQIhAMkfBhg9bCqjFyt8PBPOm/vz8+ZgZlE0/JAXeV7IPCVfAiEA 8 | gZwCFm1ghGxmaoB424YC4DHeDeN/g9xwJHT7EuM9Mvc= 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /extra/yassl/certs/server-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBOwIBAAJBAMZ7wGiBL96CP/msw4ZKZrfs1PH2ZCH/9aI0QtA4n8bdO24mZWpU 3 | lt3Se+s2oq5+Kp5+VqW2h58VxxhmfhZ34qcCAwEAAQJBAJSbGxgjgV+rTZL2Ev58 4 | viN/IoB25cm/Bn4Heu7DNn2A2kpdGX2cCaf7rEQoIKCiHxvopvxOcd/7nLS/gNli 5 | dCECIQD/cX/9fvB1Uajw0fmvwNON9+3P9uJSqpig90zL32pwjQIhAMbqee9TBMN4 6 | TxXbgWqA92PrCXe8WDZ3PwoJqdR6MRUDAiEAny+TDF1z6hiWiGTCDgXDkKBlwgjf 7 | p5aKgR077XzwLu0CICVpWEGg1ZaF/CnaPP7w/pZ2UDOK4vRrfRnAM4bY7H5NAiBS 8 | 1eXJ/MCZ2uPfpl7XK2BU9P69KdKUk5WHxdRchVvcDg== 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /sql/message.mc: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; To change or add messages mysqld writes to the Windows error log, run 3 | ; mc.exe message.mc 4 | ; and checkin generated messages.h, messages.rc and msg000001.bin under the 5 | ; source control. 6 | ; mc.exe can be installed with Windows SDK, some Visual Studio distributions 7 | ; do not include it. 8 | ;*/ 9 | MessageId = 100 10 | Severity = Error 11 | Facility = Application 12 | SymbolicName = MSG_DEFAULT 13 | Language = English 14 | %1For more information, see Help and Support Center at http://www.mysql.com. 15 | 16 | 17 | -------------------------------------------------------------------------------- /dbug/factorial.c: -------------------------------------------------------------------------------- 1 | #ifdef DBUG_OFF /* We are testing dbug */ 2 | 3 | int factorial(register int value) { 4 | if(value > 1) { 5 | value *= factorial(value-1); 6 | } 7 | return value; 8 | } 9 | 10 | #else 11 | 12 | #include 13 | 14 | int factorial ( 15 | register int value) 16 | { 17 | DBUG_ENTER ("factorial"); 18 | DBUG_PRINT ("find", ("find %d factorial", value)); 19 | if (value > 1) { 20 | value *= factorial (value - 1); 21 | } 22 | DBUG_PRINT ("result", ("result is %d", value)); 23 | DBUG_RETURN (value); 24 | } 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /regex/main.ih: -------------------------------------------------------------------------------- 1 | /* ========= begin header generated by ./mkh ========= */ 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | /* === main.c === */ 7 | void regress(FILE *in); 8 | void rx_try(char *f0, char *f1, char *f2, char *f3, char *f4, int opts); 9 | int options(int type, char *s); 10 | int opt(int c, char *s); 11 | void fixstr(register char *p); 12 | char *check(char *str, my_regmatch_t sub, char *should); 13 | static char *eprint(int err); 14 | static int efind(char *name); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | /* ========= end header generated by ./mkh ========= */ 20 | -------------------------------------------------------------------------------- /dbug/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main (argc, argv) 4 | int argc; 5 | char *argv[]; 6 | { 7 | int result, ix; 8 | extern int factorial(int); 9 | DBUG_ENTER ("main"); 10 | DBUG_PROCESS (argv[0]); 11 | for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) { 12 | switch (argv[ix][1]) { 13 | case '#': 14 | DBUG_PUSH (&(argv[ix][2])); 15 | break; 16 | } 17 | } 18 | for (; ix < argc; ix++) { 19 | DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix])); 20 | result = factorial (atoi(argv[ix])); 21 | printf ("%d\n", result); 22 | } 23 | DBUG_RETURN (0); 24 | } 25 | -------------------------------------------------------------------------------- /extra/yassl/certs/server-keyEnc.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-CBC,08132C1FFF5BC8CC 4 | 5 | gsvuAsGmB8AkR23M25w4E6wuywfBey1Jqh3g71gJcnsUYwynex9dvfAU0lTowOXh 6 | sb7ld1KNjEMzrht9AC1IC0iE1rLqvRQZOdJ7h3n7aHZQ4a/HjcwAhqJq0ZW45m6Q 7 | mpoO5fRISjx2VbKFRUz6Xj2x0/do3IjQhpuUDVrTFFe1sEySM6APZ6CVpcnTOyPR 8 | ADyLDKzOi2E+sj1UXs58pct56FaqTIZPUEflICU3k6q9FPU6gsYANRLfzegclkv4 9 | JAx6mKVSJuYnjCCppx8WBwGJa1J1GcYRJ3qFfdbUzL4bcXTvoFkJEnDkHsXgDUS6 10 | xmT0XGT3IMaW8cwQ8KD8m5YYI/L26Mas/w3eA2ekyMR8pYICjXp/YZtcKxxkQSVE 11 | Uv/+D+20KbNAHIW5Mrxf61cX/CggGEbVP8ZhDY1flh8= 12 | -----END RSA PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /regex/utils.h: -------------------------------------------------------------------------------- 1 | /* utility definitions */ 2 | #ifdef _POSIX2_RE_DUP_MAX 3 | #define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ 4 | #else 5 | #define DUPMAX 255 6 | #endif 7 | #define RE_INFINITY (DUPMAX + 1) 8 | #define NC (CHAR_MAX - CHAR_MIN + 1) 9 | typedef unsigned char uch; 10 | 11 | /* switch off assertions (if not already off) if no REDEBUG */ 12 | #ifndef REDEBUG 13 | #ifndef NDEBUG 14 | #define NDEBUG /* no assertions please */ 15 | #endif 16 | #endif 17 | #include 18 | 19 | /* for old systems with bcopy() but no memmove() */ 20 | #ifdef USEBCOPY 21 | #define memmove(d, s, c) bcopy(s, d, c) 22 | #endif 23 | -------------------------------------------------------------------------------- /regex/CHANGES: -------------------------------------------------------------------------------- 1 | This is an altered distribution of regexp for mysql. 2 | The follwing changes has been done to use the mysql configuration system and 3 | ISOLATIN1 characters. 4 | 5 | New Makefile 6 | 7 | Changed all files to include global.h 8 | 9 | Some changes in types to suppress warning errors from gcc. 10 | 11 | debug.c ; extra parameter to regchar 12 | 13 | Made regex_init & regex_end calls to init & free dynamic cclasses array. 14 | 15 | Fixed memory allocation bug in 'matcher' 16 | 17 | Changed regcomp.c to use bmove_upp() instead of memmove() 18 | 19 | Changed name of function try to rx_try in main.cc for Digitial C compiler. 20 | -------------------------------------------------------------------------------- /extra/yassl/certs/client-keyEnc.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-CBC,B9D8FB94E38635AB 4 | 5 | e7bVyzL1RF6p7hl8GDaOrRTcgB4ip+pWWUcnNf6y2tsuAQx/c/Bd5c9ZDc3L5AXC 6 | oOAzWYB+ay1vWkmAQB4ivFS5QzGDf8870d4FbOejwmgPhiHdZNw5xNwscAN6ps0v 7 | dFaUrR9nzWmbycsQCjXZGIZtGFCtXkA8Gdl5OMO4o+rzM0muNPS5fb++x7oNl1YG 8 | gjReu2sQ85dPfMlnoHhr8Pz9LBcxVyOmcqtmT0SOSuPcoj6aDtcZ+EY9MQf6SR9E 9 | ysmrJKMtp+ABgXglAj5hbT0dMpoJ2KpJYk62JAh/A6DDyv5YYUI0W57xY5+QzaV+ 10 | YXnIvqwLjJ3cXEV4YH7ozLHAESgnAAUoQsin42rrRKt7GxjSdBoFhWjH69V2nl65 11 | LYRNjE1O5BBEX+rz0S+fe2ZZgT17kUr7eLZCq15J+L5xWQ7R4ERc0w== 12 | -----END RSA PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /extra/yassl/certs/client-keyEnc3.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,BDE979D13CCC0ABD 4 | 5 | N7yz2JV13EmQ7MZPL5wamid5+G1V1gp8FKqMemAC5JDxonS/W9oViMLUcxbfPTDx 6 | FznKdYSVTIQ7vv3ofmDG4MEyV/2C568N2kdtAw+jTfrZFN+IU9CI+W+In/nacirF 7 | 02sAcvDMofustnooKNOO7/iyb5+3vRvEt5vSSRQn5WuSQ9sUKjuzoLs/lbf7fyAt 8 | 4NeqfI3rYBZXxiUOLITOGXzGNRuFoY+o2uDCfelLAJ8uhiVG6ME3LeJEo1dT5lZ8 9 | CSJOLPasKg0iG4V7olM4j9FvAfZr48RRsSfUen756Jo2HpI4bad8LKhFYIdNs2Au 10 | WwKLmjpo6QB9hBmRshR04rEXPdrgTqLBExCE08PyaGYnWU8ggWritCeBzDQFj/n4 11 | sI+NO0Mymuvg98e5RpO52lg3Xnqv9RIK3guLFOmI6aEHC0PS4WwOEQ== 12 | -----END RSA PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/test.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "test"=.\test.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /sql/udf_example.def: -------------------------------------------------------------------------------- 1 | LIBRARY udf_example 2 | VERSION 1.0 3 | EXPORTS 4 | lookup 5 | lookup_init 6 | reverse_lookup 7 | reverse_lookup_init 8 | metaphon_init 9 | metaphon_deinit 10 | metaphon 11 | myfunc_double_init 12 | myfunc_double 13 | myfunc_int_init 14 | myfunc_int 15 | sequence_init 16 | sequence_deinit 17 | sequence 18 | avgcost_init 19 | avgcost_deinit 20 | avgcost_reset 21 | avgcost_add 22 | avgcost_clear 23 | avgcost 24 | is_const 25 | is_const_init 26 | check_const_len 27 | check_const_len_init 28 | my_median_init 29 | my_median_deinit 30 | my_median_add 31 | my_median_clear 32 | my_median 33 | -------------------------------------------------------------------------------- /libevent/test/test-init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Compile with: 3 | * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent 4 | */ 5 | #ifdef HAVE_CONFIG_H 6 | #include "config.h" 7 | #endif 8 | 9 | 10 | #include 11 | #include 12 | #include 13 | #ifdef HAVE_SYS_SOCKET_H 14 | #include 15 | #endif 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | 25 | int 26 | main(int argc, char **argv) 27 | { 28 | /* Initalize the event library */ 29 | event_init(); 30 | 31 | return (0); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/airport.txt: -------------------------------------------------------------------------------- 1 | 'ATL','WILLIAM B. HARTSFIELD','ATLANTA,GEORGIA','GA','USA','EST' 2 | 'BOS','LOGAN INTERNATIONAL','BOSTON,MASSACHUSETTS','MA','USA','EST' 3 | 'BWI','BALTIMORE/WASHINGTON INTERNATIONAL','BALTIMORE,MARYLAND','MD','USA','EST' 4 | 'DEN','STAPLETON INTERNATIONAL','DENVER,COLORADO','CO','USA','MST' 5 | 'DFW','DALLAS/FORT WORTH INTERNATIONAL','DALLAS/FT. WORTH,TEXAS','TX','USA','CST' 6 | 'OAK','METROPOLITAN OAKLAND INTERNATIONAL','OAKLAND,CALIFORNIA','CA','USA','PST' 7 | 'PHL','PHILADELPHIA INTERNATIONAL','PHILADELPHIA PA/WILM\'TON,DE','PA','USA','EST' 8 | 'PIT','GREATER PITTSBURGH','PITTSBURGH,PENNSYLVANIA','PA','USA','EST' 9 | 'SFO','SAN FRANCISCO INTERNATIONAL','SAN FRANCISCO,CALIFORNIA','CA','USA','PST' 10 | -------------------------------------------------------------------------------- /man/mysqlman.1: -------------------------------------------------------------------------------- 1 | .TH mysqlman 1 "20 July 2004" "MySQL" "MySQL database" 2 | .SH NAME 3 | mysqlman \- default man page for mysql 4 | .SH "DESCRIPTION" 5 | Certain executables distributed with the MySQL database management system do 6 | not have specific man pages. 7 | .SH "SEE ALSO" 8 | In most cases, you can run the executable from the command line with a "--help" 9 | argument to display a brief summary of the executable's arguments and function. 10 | For more information about MySQL, please refer to the MySQL reference manual, 11 | which may already be installed locally and which is also available online at 12 | http://dev.mysql.com/doc/mysql/en 13 | .SH BUGS 14 | Please refer to http://bugs.mysql.com/ to report bugs. 15 | .\" end of man page 16 | -------------------------------------------------------------------------------- /dbug/remove_function_from_trace.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | die <stdout) removes lines from dbug trace that were generated 8 | by specified functions and all functions down the call stack. Produces the 9 | same effect as if the original source had DBUG_PUSH(""); right after 10 | DBUG_ENTER() and DBUG_POP(); right before DBUG_RETURN in every such a function. 11 | EEE 12 | 13 | $re=join('|', @ARGV); 14 | $skip=''; 15 | 16 | while() { 17 | print unless $skip; 18 | next unless /^(?:.*: )*((?:\| )*)([<>])($re)\n/o; 19 | if ($2 eq '>') { 20 | $skip=$1.$3 unless $skip; 21 | next; 22 | } 23 | next if $skip ne $1.$3; 24 | $skip=''; 25 | print; 26 | } 27 | -------------------------------------------------------------------------------- /packaging/rpm-uln/README-ULN: -------------------------------------------------------------------------------- 1 | In order to have RPMs of MySQL which are distributed via ULN for Oracle Linux 2 | to be as closely compatible to such RPMs built and distributed by RedHat, 3 | this directory contains additional files which originated at RedHat 4 | and are used only for such RPMs intended for distribution via ULN. 5 | 6 | Especially, this directory contains the spec file used to build these RPMs, 7 | named "mysql.spec". Please regard the following note: 8 | 9 | You are receiving a copy of the Red Hat spec file. 10 | The terms of the Oracle license do NOT apply to the Red Hat spec file; 11 | it is licensed under the 12 | GNU GENERAL PUBLIC LICENSE Version 2, June 1991 13 | separately from the Oracle programs you receive. 14 | 15 | 16 | -------------------------------------------------------------------------------- /packaging/rpm-uln/mysql-embedded-check.c: -------------------------------------------------------------------------------- 1 | /* simple test program to see if we can link the embedded server library */ 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "mysql.h" 8 | 9 | MYSQL *mysql; 10 | 11 | static char *server_options[] = \ 12 | { "mysql_test", "--defaults-file=my.cnf", NULL }; 13 | int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; 14 | 15 | static char *server_groups[] = { "libmysqld_server", 16 | "libmysqld_client", NULL }; 17 | 18 | int main(int argc, char **argv) 19 | { 20 | mysql_library_init(num_elements, server_options, server_groups); 21 | mysql = mysql_init(NULL); 22 | mysql_close(mysql); 23 | mysql_library_end(); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /support-files/magic: -------------------------------------------------------------------------------- 1 | # 2 | # Add the following to the end of your /etc/magic file to get the 'file' 3 | # command to recognize some MySQL files. 4 | # 5 | 0 beshort 0xfe01 MySQL table definition file 6 | >2 byte x Version %d 7 | 0 belong&0xffffff00 0xfefe0300 MySQL MISAM index file 8 | >3 byte x Version %d 9 | 0 belong&0xffffff00 0xfefe0700 MySQL MISAM compressed data file 10 | >3 byte x Version %d 11 | 0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file 12 | >3 byte x Version %d 13 | 0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file 14 | >3 byte x Version %d 15 | 0 string \376bin MySQL replication log 16 | -------------------------------------------------------------------------------- /sql/ndb_share.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | #include "ndb_share.h" 19 | -------------------------------------------------------------------------------- /cmake/os/Cygwin.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 Sun Microsystems, Inc. 2 | # Use is subject to license terms. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | # Cygwin is not Windows 18 | SET(WIN32 0) -------------------------------------------------------------------------------- /extra/yassl/include/openssl/des.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* des.h for openssl */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* hmac.h for openvpn */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* md4.h for libcurl */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/pem.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* pem.h for libcurl */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/sha.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* sha.h for openvpn */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/x509.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* x509.h for libcurl */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/des_old.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* des_old.h for openvn */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/objects.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* objects.h for openvpn */ 20 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/rand.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* rand.h for openSSL */ 20 | 21 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/x509v3.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* x509v3.h for libcurl */ 20 | -------------------------------------------------------------------------------- /sql-bench/Comments/interbase: -------------------------------------------------------------------------------- 1 | Running crash-me on Interbase: 2 | I 3 | - got opensource version of interbase 6.0.1 4 | (both mode, classic and superserver), 5 | - set up DBD::InterBase from cpan, 6 | - created database "test" and set sql_dialect for that database to 3 7 | - executed crash-me for both interbase's models (classic and superserver). 8 | 9 | There were some problems during the execution: 10 | 1) Sometimes client side got SIGSEGV , At that moment server side 11 | writes 12 | gds__alloc: non-positive size allocation request 13 | to log file. 14 | This problem has both models. I am not shure if it's interbase or 15 | DBD:InterBase problem (though DBD::InterBase made all nesessary 16 | tests during the installation without any problem) 17 | 18 | 2) In "superserver" mode ibserver several times died (and ibguard restarted it) 19 | -------------------------------------------------------------------------------- /sql/sql_rewrite.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU General Public License 5 | as published by the Free Software Foundation; version 2 of 6 | the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 16 | 02110-1301 USA */ 17 | 18 | void mysql_rewrite_query(THD *thd); 19 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/lhash.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* lhash.h for openSSL */ 20 | 21 | -------------------------------------------------------------------------------- /packaging/rpm-uln/mysql-5.5-errno.patch: -------------------------------------------------------------------------------- 1 | "extern int errno" is just a really bad idea. 2 | 3 | 4 | diff -Naur mysql-5.1.32.orig/include/my_sys.h mysql-5.1.32/include/my_sys.h 5 | --- mysql-5.1.32.orig/include/my_sys.h 2009-02-13 19:52:19.000000000 -0500 6 | +++ mysql-5.1.32/include/my_sys.h 2009-03-04 18:08:40.000000000 -0500 7 | @@ -199,13 +199,8 @@ 8 | #define my_afree(PTR) my_free(PTR) 9 | #endif /* HAVE_ALLOCA */ 10 | 11 | -#ifndef errno /* did we already get it? */ 12 | -#ifdef HAVE_ERRNO_AS_DEFINE 13 | #include /* errno is a define */ 14 | -#else 15 | -extern int errno; /* declare errno */ 16 | -#endif 17 | -#endif /* #ifndef errno */ 18 | + 19 | extern char *home_dir; /* Home directory for user */ 20 | extern const char *my_progname; /* program-name (printed in errors) */ 21 | extern char curr_dir[]; /* Current directory for user */ 22 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/prefix_crypto.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | #define SSLeay_version yaSSLeay_version 20 | -------------------------------------------------------------------------------- /packaging/rpm-uln/scriptstub.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | /* Translate call of myself into call of same-named script in LIBDIR */ 7 | /* The macro LIBDIR must be defined as a double-quoted string */ 8 | 9 | int main (int argc, char **argv) 10 | { 11 | char *basename; 12 | char *fullname; 13 | char **newargs; 14 | int i; 15 | 16 | basename = strrchr(argv[0], '/'); 17 | if (basename) 18 | basename++; 19 | else 20 | basename = argv[0]; 21 | fullname = malloc(strlen(LIBDIR) + strlen(basename) + 2); 22 | sprintf(fullname, "%s/%s", LIBDIR, basename); 23 | newargs = malloc((argc+1) * sizeof(char *)); 24 | newargs[0] = fullname; 25 | for (i = 1; i < argc; i++) 26 | newargs[i] = argv[i]; 27 | newargs[argc] = NULL; 28 | 29 | execvp(fullname, newargs); 30 | 31 | return 1; 32 | } 33 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/code_description.txt: -------------------------------------------------------------------------------- 1 | '-','A DASH IN A DAY CODE POSITION INDICATES NON-OPERATION ON THAT DAY' 2 | 'AP','ADVANCE PURCHASE EXCURSION FARE' 3 | 'CAD','CANADIAN DOLLARS' 4 | 'EX','EXCURSION FARE' 5 | 'H','HIGHEST LEVEL OF FARE HAVING MORE THAN ONE SEASONAL LEVEL' 6 | 'J','THIRD LEVEL OF FARE HAVING MORE THAN THREE SEASONAL LEVELS' 7 | 'K','SECOND LEVEL OF A FARE HAVING MORE THAN TWO SEASONAL LEVELS' 8 | 'L','LOWEST LEVEL OF FARE HAVING MORE THAN ONE SEASONAL LEVEL' 9 | 'MEP','MEXICAN PESOS' 10 | 'O','SECOND LEVEL OF A FARE HAVING MORE THAN TWO SEASONAL LEVELS' 11 | 'N','NIGHT SERVICE' 12 | 'VU','VISIT USA FARE' 13 | 'W','WHEN USED AS PART OF A FARE CLASS SUCH AS YW,INDICATES WEEKEND APPLICATION.' 14 | 'X','WHEN USED AS PART OF A FARE CLASS SUCH AS YX,INDICATES WEEKDAY APPLICATION.' 15 | 'U.S.','48 CONTIGUOUS STATES (NOT INCLUDING ALASKA AND HAWAII) UNLESS OTHERWISE NOTED.' 16 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/ground_service.txt: -------------------------------------------------------------------------------- 1 | 'MATL','ATL','L',9.00 2 | 'MATL','ATL','R',0.00 3 | 'MATL','ATL','A',0.00 4 | 'BBOS','BOS','L',5.00 5 | 'BBOS','BOS','R',0.00 6 | 'BBOS','BOS','A',0.00 7 | 'DDFW','DFW','R',0.00 8 | 'DDFW','DFW','L',6.00 9 | 'FDFW','DFW','L',6.00 10 | 'FDFW','DFW','R',0.00 11 | 'DDEN','DEN','L',5.00 12 | 'DDEN','DEN','R',0.00 13 | 'DDEN','DEN','A',0.00 14 | 'PPHL','PHL','L',4.75 15 | 'PPHL','PHL','R',0.00 16 | 'PPHL','PHL','A',0.00 17 | 'PPIT','PIT','L',7.50 18 | 'PPIT','PIT','R',0.00 19 | 'PPIT','PIT','A',0.00 20 | 'OOAK','OAK','L',3.50 21 | 'OOAK','OAK','R',0.00 22 | 'OOAK','SFO','L',6.00 23 | 'OOAK','SFO','R',0.00 24 | 'OOAK','SFO','A',0.00 25 | 'SSFO','SFO','L',4.00 26 | 'SSFO','SFO','R',0.00 27 | 'SSFO','SFO','A',0.00 28 | 'SSFO','OAK','L',5.00 29 | 'WWAS','BWI','L',12.00 30 | 'BBWI','BWI','L',5.00 31 | 'BBWI','BWI','R',0.00 32 | 'BBWI','BWI','A',0.00 33 | '','','',0.00 34 | -------------------------------------------------------------------------------- /BUILD/compile-pentium: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | path=`dirname $0` 19 | cmake $path/.. -DWITH_DEBUG=0 20 | make 21 | -------------------------------------------------------------------------------- /BUILD/compile-pentium-debug: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | path=`dirname $0` 19 | cmake $path/.. -DWITH_DEBUG=1 20 | make 21 | -------------------------------------------------------------------------------- /mysys/mf_qsort2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* qsort that sends one extra argument to the compare subrutine */ 17 | 18 | #define QSORT_EXTRA_CMP_ARGUMENT 19 | #include "mf_qsort.c" 20 | -------------------------------------------------------------------------------- /mysys/my_crc32.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2003 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | 18 | #ifndef HAVE_COMPRESS 19 | #undef DYNAMIC_CRC_TABLE 20 | #include "../zlib/crc32.c" 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /BUILD/compile-pentium-debug-max: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | path=`dirname $0` 19 | cmake $path/.. -DWITH_DEBUG=1 20 | make 21 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/engine.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* engine.h for libcurl */ 20 | 21 | #undef HAVE_OPENSSL_ENGINE_H 22 | 23 | 24 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/pkcs12.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* pkcs12.h for libcurl */ 20 | 21 | 22 | #undef HAVE_OPENSSL_PKCS12_H 23 | 24 | -------------------------------------------------------------------------------- /BUILD/compile-pentium-gcov: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | path=`dirname $0` 19 | cmake $path/.. -DWITH_DEBUG=1 -DENABLE_GCOV=ON 20 | make 21 | -------------------------------------------------------------------------------- /Docs/linuxthreads.txt: -------------------------------------------------------------------------------- 1 | [Note this information is obsolete] 2 | 3 | Notes on compiling glibc for the standard MySQL binary: 4 | 5 | - make sure you have gcc 2.95 and gmake 3.79 or newer 6 | - wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.2.5.tar.gz 7 | - wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-2.2.5.tar.gz 8 | - tar zxvf glibc-2.2.5.tar.gz ; cd glibc-2.2.5 ; 9 | tar zxvf ../glibc-linuxthreads-2.2.5.tar.gz 10 | - patch -p1 < ~/bk/mysql/Docs/glibc-2.2.5.patch 11 | - ./configure --prefix=/usr/local/mysql-glibc --enable-static-nss \ 12 | --disable-shared --enable-add-ons=linuxthreads --target=i386 \ 13 | --host=i386-pc-linux-gnu 14 | - make 15 | - possible problems - if compiler is not properly installed, one can get 16 | "cpp: too many input" files error - easiest way to solve - SUSE RPM for gcc 17 | 2.95 18 | - surun make install 19 | - To build the binaries, run Build-tools/Do-linux-build 20 | -------------------------------------------------------------------------------- /cmake/os/OS400.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 Sun Microsystems, Inc. 2 | # Use is subject to license terms. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) 18 | INCLUDE(${_SCRIPT_DIR}/AIX.cmake) -------------------------------------------------------------------------------- /extra/yassl/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* md5.h for openssl */ 20 | 21 | #include "ssl.h" /* in there for now */ 22 | 23 | -------------------------------------------------------------------------------- /BUILD/compile-pentium-gprof: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | path=`dirname $0` 19 | cmake $path/.. -DWITH_DEBUG=0 -DENABLE_GPROF=ON 20 | make 21 | -------------------------------------------------------------------------------- /BUILD/compile-pentium-debug-max-no-ndb: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | path=`dirname $0` 19 | cmake $path/.. -DWITH_DEBUG=1 -DWITH_NDBCLUSTER=0 20 | make 21 | -------------------------------------------------------------------------------- /regex/regfree.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "my_regex.h" 6 | 7 | #include "utils.h" 8 | #include "regex2.h" 9 | 10 | /* 11 | - regfree - free everything 12 | = extern void regfree(regex_t *); 13 | */ 14 | void 15 | my_regfree(preg) 16 | my_regex_t *preg; 17 | { 18 | register struct re_guts *g; 19 | 20 | if (preg->re_magic != MAGIC1) /* oops */ 21 | return; /* nice to complain, but hard */ 22 | 23 | g = preg->re_g; 24 | if (g == NULL || g->magic != MAGIC2) /* oops again */ 25 | return; 26 | preg->re_magic = 0; /* mark it invalid */ 27 | g->magic = 0; /* mark it invalid */ 28 | 29 | if (g->strip != NULL) 30 | free((char *)g->strip); 31 | if (g->sets != NULL) 32 | free((char *)g->sets); 33 | if (g->setbits != NULL) 34 | free((char *)g->setbits); 35 | if (g->must != NULL) 36 | free(g->must); 37 | free((char *)g); 38 | } 39 | -------------------------------------------------------------------------------- /unittest/mytap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) 17 | ADD_LIBRARY(mytap tap.c) 18 | TARGET_LINK_LIBRARIES(mytap mysys) 19 | -------------------------------------------------------------------------------- /BUILD/compile-pentium64: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Library General Public 7 | # License as published by the Free Software Foundation; version 2 8 | # of the License. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General Public 16 | # License along with this library; if not, write to the Free 17 | # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | # MA 02111-1307, USA 19 | 20 | path=`dirname $0` 21 | cmake $path/.. -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_C_FLAGS=-m64 22 | make 23 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/err.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* err.h for openssl */ 20 | 21 | #ifndef yaSSL_err_h__ 22 | #define yaSSL_err_h__ 23 | 24 | 25 | 26 | #endif /* yaSSL_err_h__ */ 27 | -------------------------------------------------------------------------------- /dbug/my_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | this is modified version of the original example main.c 3 | fixed so that it could compile and run in MySQL source tree 4 | */ 5 | 6 | #ifdef DBUG_OFF /* We are testing dbug */ 7 | #undef DBUG_OFF 8 | #endif 9 | 10 | #include /* This includes dbug.h */ 11 | #include 12 | 13 | int main (argc, argv) 14 | int argc; 15 | char *argv[]; 16 | { 17 | register int result, ix; 18 | extern int factorial(int); 19 | my_thread_global_init(); 20 | 21 | { 22 | DBUG_ENTER ("main"); 23 | DBUG_PROCESS (argv[0]); 24 | for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) { 25 | switch (argv[ix][1]) { 26 | case '#': 27 | DBUG_PUSH (&(argv[ix][2])); 28 | break; 29 | } 30 | } 31 | for (; ix < argc; ix++) { 32 | DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix])); 33 | result = factorial (atoi(argv[ix])); 34 | printf ("%d\n", result); 35 | } 36 | DBUG_RETURN (0); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /sql/hash_filo.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | 17 | /* 18 | ** A class for static sized hash tables where old entries are deleted according 19 | ** to usage. 20 | */ 21 | 22 | #include "sql_priv.h" 23 | #include "hash_filo.h" 24 | -------------------------------------------------------------------------------- /sql/frm_crypt.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef FRM_CRYPT_INCLUDED 17 | #define FRM_CRYPT_INCLUDED 18 | 19 | class SQL_CRYPT; 20 | 21 | SQL_CRYPT *get_crypt_for_frm(void); 22 | 23 | #endif /* FRM_CRYPT_INCLUDED */ 24 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/rsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* rsa.h for openSSL */ 20 | 21 | 22 | #ifndef yaSSL_rsa_h__ 23 | #define yaSSL_rsa_h__ 24 | 25 | enum { RSA_F4 = 1 }; 26 | 27 | 28 | #endif /* yaSSL_rsa_h__ */ 29 | -------------------------------------------------------------------------------- /sql/sql_binlog.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_BINLOG_INCLUDED 17 | #define SQL_BINLOG_INCLUDED 18 | 19 | class THD; 20 | 21 | void mysql_client_binlog_statement(THD *thd); 22 | 23 | #endif /* SQL_BINLOG_INCLUDED */ 24 | -------------------------------------------------------------------------------- /mysys/my_isnan.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */ 15 | 16 | #include "my_global.h" 17 | 18 | #ifdef __WIN__ 19 | #include 20 | #endif 21 | 22 | #include 23 | 24 | double my_double_isnan(double x) 25 | { 26 | return isnan(x); 27 | } 28 | -------------------------------------------------------------------------------- /dbug/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES( 17 | ${CMAKE_SOURCE_DIR}/dbug 18 | ${CMAKE_SOURCE_DIR}/include 19 | ) 20 | SET(DBUG_SOURCES dbug.c) 21 | ADD_CONVENIENCE_LIBRARY(dbug ${DBUG_SOURCES}) 22 | TARGET_LINK_LIBRARIES(dbug mysys) 23 | -------------------------------------------------------------------------------- /regex/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. 2 | This software is not subject to any license of the American Telephone 3 | and Telegraph Company or of the Regents of the University of California. 4 | 5 | Permission is granted to anyone to use this software for any purpose on 6 | any computer system, and to alter it and redistribute it, subject 7 | to the following restrictions: 8 | 9 | 1. The author is not responsible for the consequences of use of this 10 | software, no matter how awful, even if they arise from flaws in it. 11 | 12 | 2. The origin of this software must not be misrepresented, either by 13 | explicit claim or by omission. Since few users ever read sources, 14 | credits must appear in the documentation. 15 | 16 | 3. Altered versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. Since few users 18 | ever read sources, credits must appear in the documentation. 19 | 20 | 4. This notice may not be removed or altered. 21 | -------------------------------------------------------------------------------- /support-files/mysql-log-rotate.sh: -------------------------------------------------------------------------------- 1 | # The log file name and location can be set in 2 | # /etc/my.cnf by setting the "log-error" option 3 | # in either [mysqld] or [mysqld_safe] section as 4 | # follows: 5 | # 6 | # [mysqld] 7 | # log-error=@localstatedir@/mysqld.log 8 | # 9 | # In case the root user has a password, then you 10 | # have to create a /root/.my.cnf configuration file 11 | # with the following content: 12 | # 13 | # [mysqladmin] 14 | # password = 15 | # user= root 16 | # 17 | # where "" is the password. 18 | # 19 | # ATTENTION: The /root/.my.cnf file should be readable 20 | # _ONLY_ by root ! 21 | 22 | @localstatedir@/mysqld.log { 23 | # create 600 mysql mysql 24 | notifempty 25 | daily 26 | rotate 5 27 | missingok 28 | compress 29 | postrotate 30 | # just if mysqld is really running 31 | if test -x @bindir@/mysqladmin && \ 32 | @bindir@/mysqladmin ping &>/dev/null 33 | then 34 | @bindir@/mysqladmin flush-logs 35 | fi 36 | endscript 37 | } 38 | -------------------------------------------------------------------------------- /unittest/gunit/sql_string-t.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */ 15 | 16 | // First include (the generated) my_config.h, to get correct platform defines. 17 | #include "my_config.h" 18 | #include 19 | 20 | #include "../../sql/sql_string.h" 21 | 22 | #include "string-tests.cc" 23 | -------------------------------------------------------------------------------- /sql/ndb_global_schema_lock.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | #ifndef NDB_GLOBAL_SCHEMA_LOCK_H 19 | #define NDB_GLOBAL_SCHEMA_LOCK_H 20 | 21 | void ndbcluster_global_schema_lock_init(struct handlerton*); 22 | void ndbcluster_global_schema_lock_deinit(void); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /sql/sql_help.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_HELP_INCLUDED 17 | #define SQL_HELP_INCLUDED 18 | 19 | class THD; 20 | 21 | 22 | /* 23 | Function prototypes 24 | */ 25 | 26 | bool mysqld_help (THD *thd, const char *text); 27 | 28 | #endif /* SQL_HELP_INCLUDED */ 29 | -------------------------------------------------------------------------------- /sql/sql_manager.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_MANAGER_INCLUDED 17 | #define SQL_MANAGER_INCLUDED 18 | 19 | void start_handle_manager(); 20 | void stop_handle_manager(); 21 | bool mysql_manager_submit(void (*action)()); 22 | 23 | #endif /* SQL_MANAGER_INCLUDED */ 24 | -------------------------------------------------------------------------------- /unittest/gunit/client_string-t.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */ 15 | 16 | // First include (the generated) my_config.h, to get correct platform defines. 17 | #include "my_config.h" 18 | #include 19 | 20 | #include "../../client/sql_string.h" 21 | 22 | #include "string-tests.cc" 23 | -------------------------------------------------------------------------------- /unittest/mytap/t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | 17 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 18 | ${CMAKE_SOURCE_DIR}/unittest/mytap) 19 | 20 | ADD_EXECUTABLE(basic-t basic-t.c) 21 | TARGET_LINK_LIBRARIES(basic-t mytap) 22 | ADD_TEST(basic basic-t) 23 | -------------------------------------------------------------------------------- /cmake/check_minimal_version.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Sun Microsystems, Inc. 2 | # Use is subject to license terms. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | # This is a helper script is used to check for the minimal required version 18 | # It helps to decide whether to use autoconf based configure or cmake's 19 | # configure 20 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) 21 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/evp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* evp.h for openSSL */ 20 | 21 | #ifndef SSLEAY_NUMBER_DEFINED 22 | #define SSLEAY_NUMBER_DEFINED 23 | 24 | /* for OpenVPN */ 25 | #define SSLEAY_VERSION_NUMBER 0x0090700f 26 | 27 | 28 | #endif /* SSLEAY_NUMBER_DEFINED */ 29 | -------------------------------------------------------------------------------- /sql/main.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Sun Microsystems, Inc. 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software Foundation, 15 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 16 | 17 | /* 18 | main() for mysqld. 19 | Calls mysqld_main() entry point exported by sql library. 20 | */ 21 | extern int mysqld_main(int argc, char **argv); 22 | 23 | int main(int argc, char **argv) 24 | { 25 | return mysqld_main(argc, argv); 26 | } 27 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/test/make.bat: -------------------------------------------------------------------------------- 1 | REM Copyright (C) 2006, 2007 MySQL AB 2 | REM 3 | REM This program is free software; you can redistribute it and/or modify 4 | REM it under the terms of the GNU General Public License as published by 5 | REM the Free Software Foundation; version 2 of the License. 6 | REM 7 | REM This program is distributed in the hope that it will be useful, 8 | REM but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | REM GNU General Public License for more details. 11 | REM 12 | REM You should have received a copy of the GNU General Public License 13 | REM along with this program; if not, write to the Free Software 14 | REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | 16 | REM quick and dirty build file for testing different MSDEVs 17 | setlocal 18 | 19 | set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2 20 | 21 | cl %myFLAGS% test.cpp 22 | 23 | link.exe /out:test.exe ../src/taocrypt.lib test.obj advapi32.lib 24 | 25 | -------------------------------------------------------------------------------- /sql/init.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef INIT_INCLUDED 17 | #define INIT_INCLUDED 18 | 19 | #include "my_global.h" /* ulong */ 20 | 21 | void unireg_init(ulong options); 22 | void unireg_end(void) __attribute__((noreturn)); 23 | 24 | #endif /* INIT_INCLUDED */ 25 | -------------------------------------------------------------------------------- /sql/sql_do.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_DO_INCLUDED 17 | #define SQL_DO_INCLUDED 18 | 19 | #include "sql_list.h" /* List */ 20 | 21 | class THD; 22 | class Item; 23 | 24 | bool mysql_do(THD *thd, List &values); 25 | 26 | #endif /* SQL_DO_INCLUDED */ 27 | -------------------------------------------------------------------------------- /sql/sql_tablespace.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_TABLESPACE_INCLUDED 17 | #define SQL_TABLESPACE_INCLUDED 18 | 19 | class THD; 20 | class st_alter_tablespace; 21 | 22 | int mysql_alter_tablespace(THD* thd, st_alter_tablespace *ts_info); 23 | 24 | #endif /* SQL_TABLESPACE_INCLUDED */ 25 | -------------------------------------------------------------------------------- /BUILD/compile-pentium-valgrind-max-no-ndb: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Library General Public 7 | # License as published by the Free Software Foundation; version 2 8 | # of the License. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General Public 16 | # License along with this library; if not, write to the Free 17 | # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | # MA 02111-1307, USA 19 | 20 | path=`dirname $0` 21 | cmake $path/.. -DWITH_DEBUG=1 -DWITH_VALGRIND=1 \ 22 | -DCMAKE_C_FLAGS=-DHAVE_purify -DCMAKE_CXX_FLAGS=-DHAVE_purify \ 23 | -DWITH_NDBCLUSTER=0 24 | make 25 | -------------------------------------------------------------------------------- /cmake/cat.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Sun Microsystems, Inc. 2 | # Use is subject to license terms. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | # Concatenate files 18 | # 19 | # Parameters : 20 | # IN - input files (list) 21 | # OUT - output file 22 | FILE(WRITE ${OUT} "") 23 | FOREACH(FILENAME ${IN}) 24 | FILE(READ ${FILENAME} CONTENTS) 25 | FILE(APPEND ${OUT} "${CONTENTS}") 26 | ENDFOREACH() 27 | 28 | 29 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* opensslv.h compatibility */ 20 | 21 | #ifndef yaSSL_opensslv_h__ 22 | #define yaSSL_opensslv_h__ 23 | 24 | 25 | /* api version compatibility */ 26 | #define OPENSSL_VERSION_NUMBER 0x0090700f 27 | 28 | 29 | #endif /* yaSSLopensslv_h__ */ 30 | 31 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/benchmark/make.bat: -------------------------------------------------------------------------------- 1 | REM Copyright (C) 2006, 2007 MySQL AB 2 | REM 3 | REM This program is free software; you can redistribute it and/or modify 4 | REM it under the terms of the GNU General Public License as published by 5 | REM the Free Software Foundation; version 2 of the License. 6 | REM 7 | REM This program is distributed in the hope that it will be useful, 8 | REM but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | REM GNU General Public License for more details. 11 | REM 12 | REM You should have received a copy of the GNU General Public License 13 | REM along with this program; if not, write to the Free Software 14 | REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | 16 | REM quick and dirty build file for testing different MSDEVs 17 | setlocal 18 | 19 | set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2 20 | 21 | cl %myFLAGS% benchmark.cpp 22 | 23 | link.exe /out:benchmark.exe ../src/taocrypt.lib benchmark.obj advapi32.lib 24 | 25 | -------------------------------------------------------------------------------- /include/mysql_version.h.in: -------------------------------------------------------------------------------- 1 | /* Copyright Abandoned 1996, 1999, 2001 MySQL AB 2 | This file is public domain and comes with NO WARRANTY of any kind */ 3 | 4 | /* Version numbers for protocol & mysqld */ 5 | 6 | #ifndef _mysql_version_h 7 | #define _mysql_version_h 8 | #ifdef _CUSTOMCONFIG_ 9 | #include 10 | #else 11 | #define PROTOCOL_VERSION @PROTOCOL_VERSION@ 12 | #define MYSQL_SERVER_VERSION "@VERSION@" 13 | #define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@" 14 | #define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@" 15 | #define FRM_VER @DOT_FRM_VERSION@ 16 | #define MYSQL_VERSION_ID @MYSQL_VERSION_ID@ 17 | #define MYSQL_PORT @MYSQL_TCP_PORT@ 18 | #define MYSQL_PORT_DEFAULT @MYSQL_TCP_PORT_DEFAULT@ 19 | #define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@" 20 | #define MYSQL_CONFIG_NAME "my" 21 | #define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@" 22 | 23 | /* mysqld compile time options */ 24 | #endif /* _CUSTOMCONFIG_ */ 25 | 26 | #ifndef LICENSE 27 | #define LICENSE GPL 28 | #endif /* LICENSE */ 29 | 30 | #endif /* _mysql_version_h */ 31 | -------------------------------------------------------------------------------- /unittest/examples/skip-t.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include 17 | #include 18 | 19 | int main() { 20 | plan(4); 21 | ok1(1); 22 | ok1(1); 23 | SKIP_BLOCK_IF(1, 2, "Example of skipping a few test points in a test") { 24 | ok1(1); 25 | ok1(1); 26 | } 27 | return exit_status(); 28 | } 29 | -------------------------------------------------------------------------------- /cmake/tags.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | # Generate tag files 17 | IF(UNIX) 18 | ADD_CUSTOM_TARGET (tags 19 | COMMAND support-files/build-tags 20 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 21 | ) 22 | ADD_CUSTOM_TARGET (ctags 23 | COMMAND ctags -R -f CTAGS 24 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 25 | ) 26 | ENDIF() 27 | -------------------------------------------------------------------------------- /BUILD/autorun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Library General Public 7 | # License as published by the Free Software Foundation; version 2 8 | # of the License. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General Public 16 | # License along with this library; if not, write to the Free 17 | # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 18 | # MA 02110-1301, USA 19 | 20 | # Create MySQL cmake configure wrapper 21 | 22 | die() { echo "$@"; exit 1; } 23 | 24 | # Use a configure script that will call CMake. 25 | path=`dirname $0` 26 | cp $path/cmake_configure.sh $path/../configure 27 | chmod +x $path/../configure 28 | -------------------------------------------------------------------------------- /support-files/MacOSX/mwar-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (C) 2005 MySQL AB 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | # This script can only create a library, not take it apart 19 | # again to AR files 20 | 21 | case $1 in 22 | -d*|-m*|-t*|-p*|-r*|-x*|x) 23 | echo "$0: can't handle arguments $*" 24 | exit 1; 25 | ;; 26 | -c|c|cr|cru|cu) 27 | shift; 28 | ;; 29 | esac 30 | 31 | exec mwld -lib -o $* 32 | -------------------------------------------------------------------------------- /vio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 17 | ${SSL_INCLUDE_DIRS}) 18 | ADD_DEFINITIONS(${SSL_DEFINES}) 19 | 20 | SET(VIO_SOURCES vio.c viosocket.c viossl.c viopipe.c vioshm.c viosslfactories.c) 21 | ADD_CONVENIENCE_LIBRARY(vio ${VIO_SOURCES}) 22 | TARGET_LINK_LIBRARIES(vio ${LIBSOCKET}) 23 | -------------------------------------------------------------------------------- /sql-bench/example: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | 3 | hw="2xPentium(R) 3.2 GHz, 1M cache, 4G memory" 4 | optimization="gcc 4.1.2 -m64 -O3 --static" 5 | machine="Linux-x64" 6 | 7 | # InnoDB tests 8 | 9 | ./run-all-tests --suffix=-innodb --comments="Engine=InnoDB --innodb_log_file_size=100M" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --log 10 | 11 | ./run-all-tests --suffix=_fast-innodb --comments="Engine=InnoDB --innodb_log_file_size=100M" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --fast --log 12 | 13 | 14 | # MyISAM tests 15 | 16 | ./run-all-tests --suffix=-myisam --comments="Engine=MyISAM key_buffer_size=16M" --create-options="ENGINE=myisam" --hw="$hw" --optimization="$optimization" --machine="$machine" --log 17 | 18 | ./run-all-tests --suffix=_fast-myisam --comments="Engine=MyISAM key_buffer_size=16M" --create-options="ENGINE=myisam" --hw="$hw" --optimization="$optimization" --machine="$machine" --fast --log 19 | 20 | compare-results --relative output/RUN-mysql-myisam-* output/RUN-mysql_fast-myisam* output/RUN-mysql* 21 | -------------------------------------------------------------------------------- /include/probes_mysql.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008 Sun Microsystems, Inc. 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | #ifndef PROBES_MYSQL_H 18 | 19 | #define PROBES_MYSQL_H 20 | 21 | #include 22 | 23 | #if defined(HAVE_DTRACE) && !defined(DISABLE_DTRACE) 24 | #include "probes_mysql_dtrace.h" 25 | #else 26 | #include "probes_mysql_nodtrace.h" 27 | #endif 28 | 29 | #endif /* PROBES_MYSQL_H */ 30 | -------------------------------------------------------------------------------- /sql/discover.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef DISCOVER_INCLUDED 17 | #define DISCOVER_INCLUDED 18 | 19 | #include "my_global.h" /* uchar */ 20 | 21 | int readfrm(const char *name, uchar **data, size_t *length); 22 | int writefrm(const char* name, const uchar* data, size_t len); 23 | 24 | #endif /* DISCOVER_INCLUDED */ 25 | -------------------------------------------------------------------------------- /cmake/stack_direction.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009 Sun Microsystems, Inc. 3 | Use is subject to license terms. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; version 2 of the License. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 17 | 18 | /* Check stack direction (0-down, 1-up) */ 19 | int f(int *a) 20 | { 21 | int b; 22 | return(&b > a)?1:0; 23 | } 24 | /* 25 | Prevent compiler optimizations by calling function 26 | through pointer. 27 | */ 28 | volatile int (*ptr_f)(int *) = f; 29 | int main() 30 | { 31 | int a; 32 | return ptr_f(&a); 33 | } 34 | -------------------------------------------------------------------------------- /cmd-line-utils/libedit/np/wcsdup.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: wcsdup.c,v 1.3 2008/05/26 13:17:48 haad Exp $ */ 2 | 3 | /* 4 | * Copyright (C) 2006 Aleksey Cheusov 5 | * 6 | * This material is provided "as is", with absolutely no warranty expressed 7 | * or implied. Any use is at your own risk. 8 | * 9 | * Permission to use or copy this software for any purpose is hereby granted 10 | * without fee. Permission to modify the code and to distribute modified 11 | * code is also granted without any restrictions. 12 | */ 13 | 14 | #ifndef HAVE_WCSDUP 15 | 16 | #include "config.h" 17 | 18 | #if defined(LIBC_SCCS) && !defined(lint) 19 | __RCSID("$NetBSD: wcsdup.c,v 1.3 2008/05/26 13:17:48 haad Exp $"); 20 | #endif /* LIBC_SCCS and not lint */ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | wchar_t * 27 | wcsdup(const wchar_t *str) 28 | { 29 | wchar_t *copy; 30 | size_t len; 31 | 32 | _DIAGASSERT(str != NULL); 33 | 34 | len = wcslen(str) + 1; 35 | copy = malloc(len * sizeof (wchar_t)); 36 | 37 | if (!copy) 38 | return NULL; 39 | 40 | return wmemcpy(copy, str, len); 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /BUILD/compile-pentium-valgrind-max: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | # WITH_VALGRIND : include valgrind/memcheck.h;valgrind/valgrind.h 19 | # -DHAVE_purify : activates misc. ifdefs in the source code 20 | 21 | path=`dirname $0` 22 | cmake $path/.. -DWITH_DEBUG=1 -DWITH_VALGRIND=1 \ 23 | -DCMAKE_C_FLAGS=-DHAVE_purify -DCMAKE_CXX_FLAGS=-DHAVE_purify 24 | make 25 | -------------------------------------------------------------------------------- /include/mysql/psi/psi_abi_v0.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | /** 17 | @file mysql/psi/psi_abi_v0.h 18 | ABI check for mysql/psi/psi.h, when compiling without instrumentation. 19 | This file is only used to automate detection of changes between versions. 20 | Do not include this file, include mysql/psi/psi.h instead. 21 | */ 22 | #define _global_h 23 | #include "mysql/psi/psi.h" 24 | 25 | -------------------------------------------------------------------------------- /unittest/examples/core-t.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | 21 | /* 22 | This is a simple test to demonstrate what happens if a signal that 23 | generates a core is raised. 24 | */ 25 | 26 | int main() { 27 | plan(3); 28 | ok(1, "First test"); 29 | abort(); 30 | return exit_status(); 31 | } 32 | -------------------------------------------------------------------------------- /mysys/my_getpagesize.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000-2003 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | 18 | #ifndef HAVE_GETPAGESIZE 19 | 20 | #if defined __WIN__ 21 | 22 | int my_getpagesize(void) 23 | { 24 | SYSTEM_INFO si; 25 | GetSystemInfo(&si); 26 | return si.dwPageSize; 27 | } 28 | 29 | #else 30 | 31 | /* Default implementation */ 32 | int my_getpagesize(void) 33 | { 34 | return (int)8192; 35 | } 36 | 37 | #endif 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /include/crypt_genhash_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef CRYPT_HASHGEN_IMPL_H 2 | #define CRYPT_HASHGEN_IMPL_H 3 | #define ROUNDS_DEFAULT 5000 4 | #define ROUNDS_MIN 1000 5 | #define ROUNDS_MAX 999999999 6 | #define MIXCHARS 32 7 | #define CRYPT_SALT_LENGTH 20 8 | #define CRYPT_MAGIC_LENGTH 3 9 | #define CRYPT_PARAM_LENGTH 13 10 | #define SHA256_HASH_LENGTH 43 11 | #define CRYPT_MAX_PASSWORD_SIZE (CRYPT_SALT_LENGTH + \ 12 | SHA256_HASH_LENGTH + \ 13 | CRYPT_MAGIC_LENGTH + \ 14 | CRYPT_PARAM_LENGTH) 15 | 16 | #include 17 | #include 18 | 19 | int extract_user_salt(char **salt_begin, 20 | char **salt_end); 21 | C_MODE_START 22 | char * 23 | my_crypt_genhash(char *ctbuffer, 24 | size_t ctbufflen, 25 | const char *plaintext, 26 | int plaintext_len, 27 | const char *switchsalt, 28 | const char **params); 29 | void generate_user_salt(char *buffer, int buffer_len); 30 | void xor_string(char *to, int to_len, char *pattern, int pattern_len); 31 | 32 | C_MODE_END 33 | #endif 34 | -------------------------------------------------------------------------------- /packaging/rpm-uln/my_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Kluge to support multilib installation of both 32- and 64-bit RPMS: 3 | * we need to arrange that header files that appear in both RPMs are 4 | * identical. Hence, this file is architecture-independent and calls 5 | * in an arch-dependent file that will appear in just one RPM. 6 | * 7 | * To avoid breaking arches not explicitly supported by Red Hat, we 8 | * use this indirection file *only* on known multilib arches. 9 | * 10 | * Note: this may well fail if user tries to use gcc's -I- option. 11 | * But that option is deprecated anyway. 12 | */ 13 | #if defined(__x86_64__) 14 | #include "my_config_x86_64.h" 15 | #elif defined(__i386__) 16 | #include "my_config_i386.h" 17 | #elif defined(__ppc64__) || defined(__powerpc64__) 18 | #include "my_config_ppc64.h" 19 | #elif defined(__ppc__) || defined(__powerpc__) 20 | #include "my_config_ppc.h" 21 | #elif defined(__s390x__) 22 | #include "my_config_s390x.h" 23 | #elif defined(__s390__) 24 | #include "my_config_s390.h" 25 | #elif defined(__sparc__) && defined(__arch64__) 26 | #include "my_config_sparc64.h" 27 | #elif defined(__sparc__) 28 | #include "my_config_sparc.h" 29 | #endif 30 | -------------------------------------------------------------------------------- /packaging/rpm-uln/mysql-5.5-testing.patch: -------------------------------------------------------------------------------- 1 | Hack the top-level Makefile to enable the openssl regression tests. 2 | (Why doesn't this happen automatically given the configure option??) 3 | 4 | Also, increase the overall timeout for the regression tests to 12 hours, 5 | because on a slow or heavily-loaded build machine sometimes the default of 6 | 5 hours isn't enough. (This has been demonstrated to fail in mass-rebuild 7 | scenarios, which aren't that uncommon for Fedora.) Similarly increase the 8 | per-testcase timeout to 30 minutes, since the default of 15 hasn't got a 9 | great deal of headroom either. 10 | 11 | 12 | diff -Naur mysql-5.1.32.orig/Makefile.am mysql-5.1.32/Makefile.am 13 | --- mysql-5.1.32.orig/Makefile.am 2009-02-13 19:51:56.000000000 -0500 14 | +++ mysql-5.1.32/Makefile.am 2009-03-04 18:12:36.000000000 -0500 15 | @@ -98,7 +98,7 @@ 16 | 17 | test-ns: 18 | cd mysql-test ; \ 19 | - @PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed 20 | + @PERL@ ./mysql-test-run.pl $(force) $(mem) --ssl --mysqld=--binlog-format=mixed --suite-timeout=720 --testcase-timeout=30 21 | 22 | test-binlog-statement: 23 | cd mysql-test ; \ 24 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/transport_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef yaSSL_transport_types_h__ 20 | #define yaSSL_transport_types_h__ 21 | 22 | /* Type of transport functions used for sending and receiving data. */ 23 | typedef long (*yaSSL_recv_func_t) (void *, void *, size_t); 24 | typedef long (*yaSSL_send_func_t) (void *, const void *, size_t); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /include/mysql/psi/psi_abi_v2.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | /** 17 | @file mysql/psi/psi_abi_v1.h 18 | ABI check for mysql/psi/psi.h, when using PSI_VERSION_2. 19 | This file is only used to automate detection of changes between versions. 20 | Do not include this file, include mysql/psi/psi.h instead. 21 | */ 22 | #define USE_PSI_2 23 | #define HAVE_PSI_INTERFACE 24 | #define _global_h 25 | #include "mysql/psi/psi.h" 26 | 27 | -------------------------------------------------------------------------------- /sql/ptosc.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013 Codership Oy 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License along 13 | with this program; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ 15 | 16 | #ifndef WSREP_UTILS_H 17 | #define WSREP_UTILS_H 18 | 19 | #include "sql_class.h" 20 | 21 | /* A small class to run external programs. */ 22 | class string 23 | { 24 | public: 25 | string() : string_(0) {} 26 | void set(char* str) { if (string_) free (string_); string_ = str; } 27 | ~string() { set (0); } 28 | private: 29 | char* string_; 30 | }; 31 | 32 | #endif /* WSREP_UTILS_H */ 33 | -------------------------------------------------------------------------------- /include/mysql/psi/psi_abi_v1.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | /** 17 | @file mysql/psi/psi_abi_v1.h 18 | ABI check for mysql/psi/psi.h, when using PSI_VERSION_1. 19 | This file is only used to automate detection of changes between versions. 20 | Do not include this file, include mysql/psi/psi.h instead. 21 | */ 22 | #define USE_PSI_1 23 | #define HAVE_PSI_INTERFACE 24 | #define MY_GLOBAL_INCLUDED 25 | #include "mysql/psi/psi.h" 26 | 27 | -------------------------------------------------------------------------------- /extra/yassl/include/timer.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* timer.hpp provides a high res and low res timers 20 | * 21 | */ 22 | 23 | 24 | #ifndef yaSSL_TIMER_HPP 25 | #define yaSSL_TIMER_HPP 26 | 27 | namespace yaSSL { 28 | 29 | typedef double timer_d; 30 | typedef unsigned int uint; 31 | 32 | 33 | 34 | timer_d timer(); 35 | uint lowResTimer(); 36 | 37 | 38 | 39 | } // namespace 40 | #endif // yaSSL_TIMER_HPP 41 | -------------------------------------------------------------------------------- /mysys/my_alarm.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* Function to set a varible when we got a alarm */ 17 | /* Used by my_lock samt functions in m_alarm.h */ 18 | 19 | 20 | #include "mysys_priv.h" 21 | #include "my_alarm.h" 22 | 23 | #ifdef HAVE_ALARM 24 | 25 | /* ARGSUSED */ 26 | sig_handler my_set_alarm_variable(int signo __attribute__((unused))) 27 | { 28 | my_have_got_alarm=1; /* Tell program that time expired */ 29 | return; 30 | } 31 | 32 | #endif /* HAVE_ALARM */ 33 | -------------------------------------------------------------------------------- /sql/custom_conf.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2006 MySQL AB 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software Foundation, 15 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 16 | 17 | #ifndef __MYSQL_CUSTOM_BUILD_CONFIG__ 18 | #define __MYSQL_CUSTOM_BUILD_CONFIG__ 19 | 20 | #define MYSQL_PORT 5002 21 | #ifdef __WIN__ 22 | #define MYSQL_NAMEDPIPE "SwSqlServer" 23 | #define MYSQL_SERVICENAME "SwSqlServer" 24 | #define KEY_SERVICE_PARAMETERS 25 | "SYSTEM\\CurrentControlSet\\Services\\SwSqlServer\\Parameters" 26 | #endif 27 | 28 | #endif /* __MYSQL_CUSTOM_BUILD_CONFIG__ */ 29 | -------------------------------------------------------------------------------- /sql/derror.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef DERROR_INCLUDED 17 | #define DERROR_INCLUDED 18 | 19 | #include "my_global.h" /* uint */ 20 | 21 | bool init_errmessage(void); 22 | bool read_texts(const char *file_name, const char *language, 23 | const char ***point, uint error_messages); 24 | 25 | #define RET_IF_ERR(err) if (err) DBUG_RETURN(err) 26 | 27 | #endif /* DERROR_INCLUDED */ 28 | -------------------------------------------------------------------------------- /inception_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | debug_dir=$1 4 | platform=$2 5 | 6 | if [ $# -eq 1 ] 7 | then 8 | echo "building project in $1" 9 | platform="x" 10 | elif [ $# -ne 2 ] 11 | then 12 | echo "Usage: $0 builddir [platform(linux:Xcode)]" 13 | echo "EXAPMLE: $0 debug [Xcode]" 14 | exit 15 | fi 16 | 17 | Gplatform="" 18 | makerule="" 19 | if [ $platform == "Xcode" ] 20 | then 21 | Gplatform="-G Xcode" 22 | else 23 | makerule="make install" 24 | fi 25 | 26 | if [ -d $debug_dir ] 27 | then 28 | cd $debug_dir 29 | else 30 | mkdir $debug_dir 31 | cd $debug_dir 32 | 33 | # cmake && make && make install 34 | cmake -DWITH_DEBUG=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/inception -DMYSQL_DATADIR=/data \ 35 | -DWITH_SSL=bundled -DCMAKE_BUILD_TYPE=RELEASE -DWITH_ZLIB=bundled \ 36 | -DMY_MAINTAINER_CXX_WARNINGS="-Wall -Wextra -Wunused -Wno-dev -Wwrite-strings -Wno-strict-aliasing -Wno-unused-parameter -Woverloaded-virtual" \ 37 | -DMY_MAINTAINER_C_WARNINGS="-Wall -Wextra -Wno-dev -Wunused -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement" \ 38 | $Gplatform\ 39 | .. 40 | fi 41 | 42 | if [ $platform != "Xcode" ] 43 | then 44 | $makerule 45 | fi 46 | 47 | -------------------------------------------------------------------------------- /packaging/rpm-uln/mysql-5.5-mtr1.patch: -------------------------------------------------------------------------------- 1 | Drop support for version 1 of "mysql-test-run.pl" from the RPMs: 2 | 3 | 1) The auto-generation of Perl dependencies will mishandle that code, 4 | probably because its run directory differs from its storage location. 5 | 2) It does not provide several variables which are used in tests of MySQL 5.5 6 | 7 | If you really need it, take it from the source tarball. 8 | 9 | === modified file 'mysql-test/mysql-test-run.pl' 10 | --- mysql-5.5.17-orig/mysql-test/mysql-test-run.pl 2011-10-03 11:16:40 +0000 11 | +++ mysql-5.5.17/mysql-test/mysql-test-run.pl 2011-11-16 19:06:38 +0000 12 | @@ -58,10 +58,9 @@ BEGIN { 13 | if ( $version == 1 ) 14 | { 15 | print "=======================================================\n"; 16 | - print " WARNING: Using mysql-test-run.pl version 1! \n"; 17 | + print " ERROR: Support for version 1 is dropped in this distribution! \n"; 18 | print "=======================================================\n"; 19 | - # Should use exec() here on *nix but this appears not to work on Windows 20 | - exit(system($^X, "lib/v1/mysql-test-run.pl", @ARGV) >> 8); 21 | + exit(1); 22 | } 23 | elsif ( $version == 2 ) 24 | { 25 | 26 | -------------------------------------------------------------------------------- /sql/sql_rename.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_RENAME_INCLUDED 17 | #define SQL_RENAME_INCLUDED 18 | 19 | class THD; 20 | struct TABLE_LIST; 21 | 22 | bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent); 23 | bool do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, 24 | char *new_table_name, char *new_table_alias, 25 | bool skip_error); 26 | 27 | #endif /* SQL_RENAME_INCLUDED */ 28 | -------------------------------------------------------------------------------- /include/service_versions.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifdef _WIN32 17 | #define SERVICE_VERSION __declspec(dllexport) void * 18 | #else 19 | #define SERVICE_VERSION void * 20 | #endif 21 | 22 | #define VERSION_my_snprintf 0x0100 23 | #define VERSION_thd_alloc 0x0100 24 | #define VERSION_thd_wait 0x0100 25 | #define VERSION_my_thread_scheduler 0x0100 26 | #define VERSION_my_plugin_log 0x0100 27 | #define VERSION_mysql_string 0x0100 28 | -------------------------------------------------------------------------------- /unittest/examples/todo-t.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | 21 | int main() 22 | { 23 | plan(4); 24 | ok1(1); 25 | ok1(1); 26 | /* 27 | Tests in the todo region is expected to fail. If they don't, 28 | something is strange. 29 | */ 30 | todo_start("Need to fix these"); 31 | ok1(0); 32 | ok1(0); 33 | todo_end(); 34 | return exit_status(); 35 | } 36 | -------------------------------------------------------------------------------- /sql/sql_reload.h: -------------------------------------------------------------------------------- 1 | #ifndef SQL_RELOAD_INCLUDED 2 | #define SQL_RELOAD_INCLUDED 3 | /* Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; version 2 of the License. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 17 | 18 | class THD; 19 | struct TABLE_LIST; 20 | 21 | bool reload_acl_and_cache(THD *thd, unsigned long options, 22 | TABLE_LIST *tables, int *write_to_binlog); 23 | 24 | bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables); 25 | 26 | bool flush_tables_for_export(THD *thd, TABLE_LIST *all_tables); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /sql/string_service.h: -------------------------------------------------------------------------------- 1 | /* Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef MY_STRING_SERVICE_INCLUDED 17 | #define MY_STRING_SERVICE_INCLUDED 18 | 19 | #include "sql_string.h" 20 | 21 | String temp_str; 22 | 23 | /* mysql_string_itrerator structure to provide service to plugins */ 24 | typedef struct st_string_iterator 25 | { 26 | String *iterator_str; 27 | const char *iterator_ptr; 28 | int ctype; 29 | } string_iterator; 30 | 31 | #endif /* MY_STRING_SERVICE_INCLUDED */ 32 | -------------------------------------------------------------------------------- /zlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES( 17 | ${CMAKE_SOURCE_DIR}/include 18 | ${CMAKE_SOURCE_DIR}/zlib 19 | ) 20 | SET(ZLIB_SOURCES adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio.c infback.c inffast.c inffast.h 21 | inffixed.h inflate.c inflate.h inftrees.c inftrees.h trees.c trees.h uncompr.c zconf.h zlib.h 22 | zutil.c zutil.h) 23 | ADD_CONVENIENCE_LIBRARY(zlib ${ZLIB_SOURCES}) 24 | RESTRICT_SYMBOL_EXPORTS(zlib) 25 | -------------------------------------------------------------------------------- /extra/yassl/include/openssl/crypto.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* crypto.h for openSSL */ 20 | 21 | #ifndef ysSSL_crypto_h__ 22 | #define yaSSL_crypto_h__ 23 | 24 | #ifdef YASSL_PREFIX 25 | #include "prefix_crypto.h" 26 | #endif 27 | 28 | const char* SSLeay_version(int type); 29 | 30 | #define SSLEAY_NUMBER_DEFINED 31 | #define SSLEAY_VERSION 0x0900L 32 | #define SSLEAY_VERSION_NUMBER SSLEAY_VERSION 33 | 34 | 35 | #endif /* yaSSL_crypto_h__ */ 36 | 37 | -------------------------------------------------------------------------------- /unittest/mytap/t/basic-t.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include "my_config.h" 17 | 18 | #include 19 | #include "../tap.h" 20 | 21 | int main() { 22 | plan(5); 23 | ok(1 == 1, "testing basic functions"); 24 | ok(2 == 2, " "); 25 | ok1(3 == 3); 26 | if (1 == 1) 27 | skip(2, "Sensa fragoli"); 28 | else { 29 | ok(1 == 2, "Should not be run at all"); 30 | ok(1, "This one neither"); 31 | } 32 | return exit_status(); 33 | } 34 | -------------------------------------------------------------------------------- /include/my_rnd.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_RANDOM_INCLUDED 2 | #define MY_RANDOM_INCLUDED 3 | 4 | /* 5 | Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; version 2 of the License. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | 20 | /* 21 | A wrapper to use OpenSSL/YaSSL PRNGs. 22 | */ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | double my_rnd_ssl(struct rand_struct *rand_st); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* MY_RANDOM_INCLUDED */ 39 | -------------------------------------------------------------------------------- /include/sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef SHA1_INCLUDED 2 | #define SHA1_INCLUDED 3 | 4 | /* Copyright (c) 2002, 2006 MySQL AB, 2009 Sun Microsystems, Inc. 5 | Use is subject to license terms. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; version 2 of the License. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #define SHA1_HASH_SIZE 20 /* Hash size in bytes */ 22 | 23 | C_MODE_START 24 | 25 | void compute_sha1_hash(uint8 *digest, const char *buf, int len); 26 | void compute_sha1_hash_multi(uint8 *digest, const char *buf1, int len1, 27 | const char *buf2, int len2); 28 | 29 | C_MODE_END 30 | 31 | #endif /* SHA1_INCLUDED */ 32 | -------------------------------------------------------------------------------- /sql-bench/Data/ATIS/class_of_service.txt: -------------------------------------------------------------------------------- 1 | 'R',1,'SUPERSONIC AIRCRAFT' 2 | 'P',2,'FIRST CLASS PREMIUM' 3 | 'F',3,'FIRST CLASS' 4 | 'A',4,'FIRST CLASS DISCOUNTED' 5 | 'J',5,'BUSINESS CLASS PREMIUM' 6 | 'C',6,'BUSINESS CLASS' 7 | 'D',7,'BUSINESS CLASS DISCOUNTED' 8 | 'S',8,'STANDARD CLASS' 9 | 'W',9,'COACH ECONOMY CLASS PREMIUM' 10 | 'FN',10,'FIRST CLASS NIGHT SERVICE' 11 | 'Y',11,'COACH ECONOMY CLASS' 12 | 'CN',12,'BUSINESS CLASS NIGHT SERVICE' 13 | 'YN',13,'COACH ECONOMY CLASS NIGHT SERVICE' 14 | 'B',14,'COACH ECONOMY CLASS DISCOUNTED' 15 | 'H',15,'COACH ECONOMY CLASS DISCOUNTED' 16 | 'Q',16,'COACH ECONOMY CLASS DISCOUNTED' 17 | 'M',17,'COACH ECONOMY CLASS DISCOUNTED' 18 | 'T',18,'COACH ECONOMY CLASS DISCOUNTED' 19 | 'K',19,'THRIFT ECONOMY CLASS' 20 | 'L',20,'THRIFT ECONOMY CLASS DISCOUNTED' 21 | 'V',21,'THRIFT ECONOMY CLASS DISCOUNTED' 22 | 'BN',22,'COACH ECONOMY CLASS DISCOUNTED NIGHT SERVICE' 23 | 'QN',23,'COACH ECONOMY CLASS DISCOUNTED NIGHT SERVICE' 24 | 'KN',24,'THRIFT ECONOMY CLASS DISCOUNTED NIGHT SERVICE' 25 | 'VN',25,'THRIFT ECONOMY CLASS DISCOUNTED NIGHT SERVICE' 26 | 'U',26,'SHUTTLE SERVICE (NO RESERVATION NEEDED - SEAT GUARANTEED)' 27 | 'E',27,'SHUTTLE SERVICE (NO RESERVATION ALLOWED - SEAT TO BE CONFIRMED AT CHECK-IN)' 28 | -------------------------------------------------------------------------------- /libevent/test/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign no-dependencies 2 | 3 | AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat 4 | 5 | EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c 6 | 7 | noinst_PROGRAMS = test-init test-eof test-weof test-time regress bench 8 | 9 | BUILT_SOURCES = regress.gen.c regress.gen.h 10 | test_init_SOURCES = test-init.c 11 | test_init_LDADD = ../libevent_core.la 12 | test_eof_SOURCES = test-eof.c 13 | test_eof_LDADD = ../libevent_core.la 14 | test_weof_SOURCES = test-weof.c 15 | test_weof_LDADD = ../libevent_core.la 16 | test_time_SOURCES = test-time.c 17 | test_time_LDADD = ../libevent_core.la 18 | regress_SOURCES = regress.c regress.h regress_http.c regress_dns.c \ 19 | regress_rpc.c \ 20 | regress.gen.c regress.gen.h 21 | regress_LDADD = ../libevent.la 22 | bench_SOURCES = bench.c 23 | bench_LDADD = ../libevent.la 24 | 25 | regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py 26 | $(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed" 27 | 28 | DISTCLEANFILES = *~ 29 | 30 | test: test-init test-eof test-weof test-time regress 31 | 32 | verify: test 33 | @$(srcdir)/test.sh 34 | 35 | bench test-init test-eof test-weof test-time: ../libevent.la 36 | -------------------------------------------------------------------------------- /cmake/cpu_info.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009, 2011, 2012 Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | # Symbols with information about the CPU. 17 | 18 | FIND_PROGRAM(GETCONF getconf) 19 | MARK_AS_ADVANCED(GETCONF) 20 | 21 | IF(GETCONF) 22 | EXECUTE_PROCESS( 23 | COMMAND ${GETCONF} LEVEL1_DCACHE_LINESIZE 24 | OUTPUT_VARIABLE CPU_LEVEL1_DCACHE_LINESIZE 25 | ) 26 | ENDIF() 27 | IF(CPU_LEVEL1_DCACHE_LINESIZE AND CPU_LEVEL1_DCACHE_LINESIZE GREATER 0) 28 | ELSE() 29 | SET(CPU_LEVEL1_DCACHE_LINESIZE 64) 30 | ENDIF() 31 | -------------------------------------------------------------------------------- /mysys/mf_unixpath.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include "mysys_priv.h" 17 | #include 18 | 19 | /** 20 | Convert filename to unix style filename. 21 | 22 | @remark On Windows, converts '\' to '/'. 23 | 24 | @param to A pathname. 25 | */ 26 | 27 | void to_unix_path(char *to __attribute__((unused))) 28 | { 29 | #if FN_LIBCHAR != '/' 30 | { 31 | to--; 32 | while ((to=strchr(to+1,FN_LIBCHAR)) != 0) 33 | *to='/'; 34 | } 35 | #endif 36 | } 37 | -------------------------------------------------------------------------------- /regex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) 17 | 18 | SET(REGEX_SOURCES regcomp.c regerror.c regexec.c regfree.c reginit.c) 19 | ADD_CONVENIENCE_LIBRARY(regex ${REGEX_SOURCES}) 20 | 21 | IF(WITH_UNIT_TESTS) 22 | ADD_EXECUTABLE(re main.c split.c debug.c) 23 | TARGET_LINK_LIBRARIES(re regex strings mysys) 24 | 25 | ADD_TEST(regex1 re -I) 26 | ADD_TEST(regex2 re -el -I) 27 | ADD_TEST(regex3 re -er -I) 28 | ENDIF() 29 | -------------------------------------------------------------------------------- /cmake/os/FreeBSD.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | # This file includes FreeBSD specific options and quirks, related to system checks 18 | 19 | # Should not be needed any more, but kept for easy resurrection if needed 20 | # #Legacy option, maybe not needed anymore , taken as is from autotools build 21 | # ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000) 22 | 23 | # The below was used for really old versions of FreeBSD, roughly: before 5.1.9 24 | # ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH) 25 | -------------------------------------------------------------------------------- /strings/is_prefix.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2001, 2006 MySQL AB 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | /* File : is_prefix.c 18 | Author : Michael Widenius 19 | Defines: is_prefix() 20 | 21 | is_prefix(s, t) returns 1 if s starts with t. 22 | A empty t is allways a prefix. 23 | */ 24 | 25 | #include 26 | #include "m_string.h" 27 | 28 | int is_prefix(register const char *s, register const char *t) 29 | { 30 | while (*t) 31 | if (*s++ != *t++) return 0; 32 | return 1; /* WRONG */ 33 | } 34 | -------------------------------------------------------------------------------- /BUILD/compile-dist: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | # 19 | # This script's purpose is to prepare for a subsequent 'make dist'; 20 | # We don't actually have to compile anything, 21 | # as the 'dist' target in our .cmake files is self-contained 22 | # i.e. it generates source dependencies. 23 | # 24 | 25 | path=`dirname $0` 26 | . $path/autorun.sh 27 | 28 | # By default we get the "community" feature set from 29 | # cmake/build_configurations/feature_set.cmake 30 | # 31 | ./configure 32 | -------------------------------------------------------------------------------- /include/my_user.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* 17 | This is a header for libraries containing functions used in both server and 18 | only some of clients (but not in libmysql)... 19 | */ 20 | 21 | #ifndef _my_user_h_ 22 | #define _my_user_h_ 23 | 24 | #include 25 | 26 | C_MODE_START 27 | 28 | void parse_user(const char *user_id_str, size_t user_id_len, 29 | char *user_name_str, size_t *user_name_len, 30 | char *host_name_str, size_t *host_name_len); 31 | 32 | C_MODE_END 33 | 34 | #endif /* _my_user_h_ */ 35 | -------------------------------------------------------------------------------- /sql/sql_union.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_UNION_INCLUDED 17 | #define SQL_UNION_INCLUDED 18 | 19 | #include "my_global.h" /* ulong */ 20 | 21 | class THD; 22 | class select_result; 23 | struct LEX; 24 | 25 | typedef class st_select_lex_unit SELECT_LEX_UNIT; 26 | 27 | bool mysql_union(THD *thd, LEX *lex, select_result *result, 28 | SELECT_LEX_UNIT *unit, ulong setup_tables_done_option); 29 | 30 | 31 | #endif /* SQL_UNION_INCLUDED */ 32 | -------------------------------------------------------------------------------- /mysys/my_div.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | 18 | /* 19 | Get filename of file 20 | 21 | SYNOPSIS 22 | my_filename() 23 | fd File descriptor 24 | */ 25 | 26 | char * my_filename(File fd) 27 | { 28 | DBUG_ENTER("my_filename"); 29 | if ((uint) fd >= (uint) my_file_limit) 30 | DBUG_RETURN((char*) "UNKNOWN"); 31 | if (fd >= 0 && my_file_info[fd].type != UNOPEN) 32 | { 33 | DBUG_RETURN(my_file_info[fd].name); 34 | } 35 | else 36 | DBUG_RETURN((char*) "UNOPENED"); /* Debug message */ 37 | } 38 | -------------------------------------------------------------------------------- /unittest/gunit/mock_field_datetime.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | #ifndef MOCK_FIELD_DATETIME_H 17 | #define MOCK_FIELD_DATETIME_H 18 | 19 | #include "field.h" 20 | 21 | class Mock_field_datetime : public Field_datetime 22 | { 23 | void initialize() 24 | { 25 | ptr= buffer; 26 | memset(buffer, 0, PACK_LENGTH); 27 | } 28 | 29 | public: 30 | uchar buffer[PACK_LENGTH]; 31 | Mock_field_datetime() : Field_datetime(false, "") { initialize(); } 32 | 33 | }; 34 | 35 | #endif // MOCK_FIELD_DATETIME_H 36 | -------------------------------------------------------------------------------- /support-files/my-default.cnf.sh: -------------------------------------------------------------------------------- 1 | # For advice on how to change settings please see 2 | # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html 3 | # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the 4 | # *** default location during install, and will be replaced if you 5 | # *** upgrade to a newer version of MySQL. 6 | 7 | [mysqld] 8 | 9 | # Remove leading # and set to the amount of RAM for the most important data 10 | # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. 11 | # innodb_buffer_pool_size = 128M 12 | 13 | # Remove leading # to turn on a very important data integrity option: logging 14 | # changes to the binary log between backups. 15 | # log_bin 16 | 17 | # These are commonly set, remove the # and set as required. 18 | # basedir = ..... 19 | # datadir = ..... 20 | # port = ..... 21 | # server_id = ..... 22 | @CNF_SOCKET_LINE@ 23 | 24 | # Remove leading # to set options mainly useful for reporting servers. 25 | # The server defaults are faster for transactions and fast SELECTs. 26 | # Adjust sizes as needed, experiment to find the optimal values. 27 | # join_buffer_size = 128M 28 | # sort_buffer_size = 2M 29 | # read_rnd_buffer_size = 2M 30 | 31 | sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 32 | -------------------------------------------------------------------------------- /include/mysql/services.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSQL_SERVICES_INCLUDED 2 | /* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #define MYSQL_SERVICES_INCLUDED 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /libevent/sample/signal-test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Compile with: 3 | * cc -I/usr/local/include -o signal-test \ 4 | * signal-test.c -L/usr/local/lib -levent 5 | */ 6 | 7 | #include 8 | 9 | #ifdef HAVE_CONFIG_H 10 | #include "config.h" 11 | #endif 12 | 13 | #include 14 | #ifndef WIN32 15 | #include 16 | #include 17 | #include 18 | #else 19 | #include 20 | #endif 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | int called = 0; 31 | 32 | static void 33 | signal_cb(int fd, short event, void *arg) 34 | { 35 | struct event *signal = arg; 36 | 37 | printf("%s: got signal %d\n", __func__, EVENT_SIGNAL(signal)); 38 | 39 | if (called >= 2) 40 | event_del(signal); 41 | 42 | called++; 43 | } 44 | 45 | int 46 | main (int argc, char **argv) 47 | { 48 | struct event signal_int; 49 | 50 | /* Initalize the event library */ 51 | event_init(); 52 | 53 | /* Initalize one event */ 54 | event_set(&signal_int, SIGINT, EV_SIGNAL|EV_PERSIST, signal_cb, 55 | &signal_int); 56 | 57 | event_add(&signal_int, NULL); 58 | 59 | event_dispatch(); 60 | 61 | return (0); 62 | } 63 | 64 | -------------------------------------------------------------------------------- /support-files/mysqld_multi.server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # A simple startup script for mysqld_multi by Tim Smith and Jani Tolonen. 4 | # This script assumes that my.cnf file exists either in /etc/my.cnf or 5 | # /root/.my.cnf and has groups [mysqld_multi] and [mysqldN]. See the 6 | # mysqld_multi documentation for detailed instructions. 7 | # 8 | # This script can be used as /etc/init.d/mysql.server 9 | # 10 | # Comments to support chkconfig on RedHat Linux 11 | # chkconfig: 2345 64 36 12 | # description: A very fast and reliable SQL database engine. 13 | # 14 | # Version 1.0 15 | # 16 | 17 | basedir=/usr/local/mysql 18 | bindir=/usr/local/mysql/bin 19 | 20 | if test -x $bindir/mysqld_multi 21 | then 22 | mysqld_multi="$bindir/mysqld_multi"; 23 | else 24 | echo "Can't execute $bindir/mysqld_multi from dir $basedir"; 25 | exit; 26 | fi 27 | 28 | case "$1" in 29 | 'start' ) 30 | "$mysqld_multi" start $2 31 | ;; 32 | 'stop' ) 33 | "$mysqld_multi" stop $2 34 | ;; 35 | 'report' ) 36 | "$mysqld_multi" report $2 37 | ;; 38 | 'restart' ) 39 | "$mysqld_multi" stop $2 40 | "$mysqld_multi" start $2 41 | ;; 42 | *) 43 | echo "Usage: $0 {start|stop|report|restart}" >&2 44 | ;; 45 | esac 46 | -------------------------------------------------------------------------------- /sql/ndb_global_schema_lock_guard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | #ifndef NDB_GLOBAL_SCHEMA_LOCK_GUARD_H 19 | #define NDB_GLOBAL_SCHEMA_LOCK_GUARD_H 20 | 21 | #include 22 | 23 | class Ndb_global_schema_lock_guard 24 | { 25 | public: 26 | Ndb_global_schema_lock_guard(THD *thd); 27 | ~Ndb_global_schema_lock_guard(); 28 | int lock(bool no_lock_queue=false, 29 | bool report_cluster_disconnected=true); 30 | private: 31 | THD* m_thd; 32 | bool m_locked; 33 | }; 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/src/aestables.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* based on Wei Dai's aestables.cpp from CryptoPP */ 20 | 21 | #include "runtime.hpp" 22 | #include "aes.hpp" 23 | 24 | 25 | namespace TaoCrypt { 26 | 27 | 28 | const word32 AES::rcon_[] = { 29 | 0x01000000, 0x02000000, 0x04000000, 0x08000000, 30 | 0x10000000, 0x20000000, 0x40000000, 0x80000000, 31 | 0x1B000000, 0x36000000, 32 | /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ 33 | }; 34 | 35 | 36 | } // namespace 37 | -------------------------------------------------------------------------------- /mysys/checksum.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | /* 22 | Calculate a long checksum for a memoryblock. 23 | 24 | SYNOPSIS 25 | my_checksum() 26 | crc start value for crc 27 | pos pointer to memory block 28 | length length of the block 29 | */ 30 | 31 | ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length) 32 | { 33 | return (ha_checksum)crc32((uint)crc, pos, (uint)length); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /sql/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFE_MUTEX") 17 | SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFE_MUTEX") 18 | 19 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql 20 | ${CMAKE_SOURCE_DIR}/extra/yassl/include 21 | ${CMAKE_SOURCE_DIR}/regex) 22 | 23 | IF(WITH_EXAMPLE_STORAGE_ENGINE) 24 | ADD_LIBRARY(example ha_example.cc) 25 | ADD_DEPENDENCIES(example GenError) 26 | ENDIF(WITH_EXAMPLE_STORAGE_ENGINE) 27 | -------------------------------------------------------------------------------- /mysys/my_libwrap.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2003 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* 17 | This is needed to be able to compile with original libwrap header 18 | files that don't have the prototypes 19 | */ 20 | 21 | #include 22 | #include 23 | 24 | #ifdef HAVE_LIBWRAP 25 | 26 | void my_fromhost(struct request_info *req) 27 | { 28 | fromhost(req); 29 | } 30 | 31 | int my_hosts_access(struct request_info *req) 32 | { 33 | return hosts_access(req); 34 | } 35 | 36 | char *my_eval_client(struct request_info *req) 37 | { 38 | return eval_client(req); 39 | } 40 | 41 | #endif /* HAVE_LIBWRAP */ 42 | -------------------------------------------------------------------------------- /strings/bmove_upp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | /* File : bmove.c 17 | Author : Michael widenius 18 | Updated: 1987-03-20 19 | Defines: bmove_upp() 20 | 21 | bmove_upp(dst, src, len) moves exactly "len" bytes from the source 22 | "src-len" to the destination "dst-len" counting downwards. 23 | */ 24 | 25 | #include 26 | #include "m_string.h" 27 | 28 | void bmove_upp(register uchar *dst, register const uchar *src, 29 | register size_t len) 30 | { 31 | while (len-- != 0) *--dst = *--src; 32 | } 33 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/include/kernelc.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* kernelc.hpp provides support for C std lib when compiled in kernel mode 20 | */ 21 | 22 | #ifndef TAOCRYPT_KERNELC_HPP 23 | #define TAOCRYPT_KERNELC_HPP 24 | 25 | #include // get right size_t 26 | 27 | // system functions that c++ doesn't like headers for 28 | 29 | extern "C" void* memcpy(void*, const void*, size_t); 30 | extern "C" void* memset(void*, int, size_t); 31 | extern "C" void printk(char *fmt, ...); 32 | 33 | 34 | #endif // TAOCRYPT_KERNELC_HPP 35 | -------------------------------------------------------------------------------- /include/mysql_embed.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSQL_EMBED_INCLUDED 2 | #define MYSQL_EMBED_INCLUDED 3 | 4 | /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; version 2 of the License. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 18 | 19 | /* Defines that are unique to the embedded version of MySQL */ 20 | 21 | #ifdef EMBEDDED_LIBRARY 22 | 23 | /* Things we don't need in the embedded version of MySQL */ 24 | /* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ 25 | 26 | #undef HAVE_DLOPEN /* No udf functions */ 27 | #undef HAVE_SMEM /* No shared memory */ 28 | 29 | #endif /* EMBEDDED_LIBRARY */ 30 | #endif /* MYSQL_EMBED_INCLUDED */ 31 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/README: -------------------------------------------------------------------------------- 1 | TaoCrypt release 0.9.2 02/5/2007 2 | 3 | 4 | This release includes bug fixes, portability enhancements, and some 5 | optimiations. 6 | 7 | See 0.9.0 for build instructions. 8 | 9 | 10 | 11 | 12 | ******************TaoCrypt release 0.9.0 09/18/2006 13 | 14 | This is the first release of TaoCrypt, it was previously only included with 15 | yaSSL. TaoCrypt is highly portable and fast, its features include: 16 | 17 | One way hash functions: SHA-1, MD2, MD4, MD5, RIPEMD-160 18 | Message authentication codes: HMAC 19 | Block Ciphers: DES, Triple-DES, AES, Blowfish, Twofish 20 | Stream Ciphers: ARC4 21 | Public Key Crypto: RSA, DSA, Diffie-Hellman 22 | Password based key derivation: PBKDF2 from PKCS #5 23 | Pseudo Random Number Generators 24 | Large Integer Support 25 | Base 16/64 encoding/decoding 26 | DER encoding/decoding 27 | X.509 processing 28 | SSE2 and ia32 asm for the right processors and compilers 29 | 30 | 31 | To build on Unix 32 | 33 | ./configure 34 | make 35 | 36 | To test the build, from the ./test directory run ./test 37 | 38 | 39 | On Windows 40 | 41 | Open the taocrypt project workspace 42 | Choose (Re)Build All 43 | 44 | To test the build, run the test executable 45 | 46 | 47 | Please send any questions or comments to todd@yassl.com. 48 | 49 | -------------------------------------------------------------------------------- /include/my_libwrap.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_LIBWRAP_INCLUDED 2 | #define MY_LIBWRAP_INCLUDED 3 | 4 | /* Copyright (c) 2000, 2006 MySQL AB, 2009 Sun Microsystems, Inc. 5 | Use is subject to license terms. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; version 2 of the License. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | 20 | #ifdef HAVE_LIBWRAP 21 | #include 22 | #include 23 | #ifdef NEED_SYS_SYSLOG_H 24 | #include 25 | #endif /* NEED_SYS_SYSLOG_H */ 26 | 27 | extern void my_fromhost(struct request_info *req); 28 | extern int my_hosts_access(struct request_info *req); 29 | extern char *my_eval_client(struct request_info *req); 30 | 31 | #endif /* HAVE_LIBWRAP */ 32 | #endif /* MY_LIBWRAP_INCLUDED */ 33 | -------------------------------------------------------------------------------- /libevent/README: -------------------------------------------------------------------------------- 1 | To build libevent, type 2 | 3 | $ ./configure && make 4 | 5 | (If you got libevent from the subversion repository, you will 6 | first need to run the included "autogen.sh" script in order to 7 | generate the configure script.) 8 | 9 | Install as root via 10 | 11 | # make install 12 | 13 | You can run the regression tests by 14 | 15 | $ make verify 16 | 17 | Before, reporting any problems, please run the regression tests. 18 | 19 | To enable the low-level tracing build the library as: 20 | 21 | CFLAGS=-DUSE_DEBUG ./configure [...] 22 | 23 | Acknowledgements: 24 | ----------------- 25 | 26 | The following people have helped with suggestions, ideas, code or 27 | fixing bugs: 28 | 29 | Alejo 30 | Weston Andros Adamson 31 | William Ahern 32 | Stas Bekman 33 | Andrew Danforth 34 | Mike Davis 35 | Shie Erlich 36 | Alexander von Gernler 37 | Artur Grabowski 38 | Aaron Hopkins 39 | Claudio Jeker 40 | Scott Lamb 41 | Adam Langley 42 | Philip Lewis 43 | David Libenzi 44 | Nick Mathewson 45 | Andrey Matveev 46 | Richard Nyberg 47 | Jon Oberheide 48 | Phil Oleson 49 | Dave Pacheco 50 | Tassilo von Parseval 51 | Pierre Phaneuf 52 | Jon Poland 53 | Bert JW Regeer 54 | Dug Song 55 | Taral 56 | 57 | If I have forgotten your name, please contact me. 58 | -------------------------------------------------------------------------------- /sql/sql_delete.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef SQL_DELETE_INCLUDED 17 | #define SQL_DELETE_INCLUDED 18 | 19 | #include "my_base.h" /* ha_rows */ 20 | 21 | class THD; 22 | struct TABLE_LIST; 23 | class Item; 24 | 25 | template class SQL_I_List; 26 | 27 | int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds); 28 | bool mysql_delete(THD *thd, TABLE_LIST *table_list, Item *conds, 29 | SQL_I_List *order, ha_rows rows, ulonglong options); 30 | 31 | #endif /* SQL_DELETE_INCLUDED */ 32 | -------------------------------------------------------------------------------- /strings/strnlen.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2001, 2006, 2007 MySQL AB 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | /* File : strnlen.c 18 | Author : Michael Widenius 19 | Updated: 20 April 1984 20 | Defines: strnlen. 21 | strnlen(s, len) returns the length of s or len if s is longer than len. 22 | */ 23 | 24 | #include 25 | #include "m_string.h" 26 | 27 | #ifndef HAVE_STRNLEN 28 | 29 | size_t strnlen(register const char *s, register size_t maxlen) 30 | { 31 | const char *end= (const char *)memchr(s, '\0', maxlen); 32 | return end ? (size_t) (end - s) : maxlen; 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /cmake/info_bin.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | 17 | # The sole purpose of this cmake control file is to create the "INFO_BIN" file. 18 | 19 | # By having a separate cmake file for this, it is ensured this happens 20 | # only in the build (Unix: "make") phase, not when cmake runs. 21 | # This, in turn, avoids creating stuff in the source directory - 22 | # it should get into the binary directory only. 23 | 24 | 25 | # Get the macros which the "INFO_*" files. 26 | INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake) 27 | 28 | # Here is where the action is. 29 | CREATE_INFO_BIN() 30 | 31 | -------------------------------------------------------------------------------- /extra/yassl/taocrypt/taocrypt.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "benchmark"=.\benchmark\benchmark.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name taocrypt 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "taocrypt"=.\taocrypt.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Project: "test"=.\test\test.dsp - Package Owner=<4> 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<4> 40 | {{{ 41 | Begin Project Dependency 42 | Project_Dep_Name taocrypt 43 | End Project Dependency 44 | }}} 45 | 46 | ############################################################################### 47 | 48 | Global: 49 | 50 | Package=<5> 51 | {{{ 52 | }}} 53 | 54 | Package=<3> 55 | {{{ 56 | }}} 57 | 58 | ############################################################################### 59 | 60 | -------------------------------------------------------------------------------- /sql/sql_builtin.cc.in: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include 17 | 18 | typedef struct st_mysql_plugin builtin_plugin[]; 19 | 20 | #ifdef _MSC_VER 21 | extern "C" 22 | #else 23 | extern 24 | #endif 25 | builtin_plugin 26 | @mysql_mandatory_plugins@ @mysql_optional_plugins@ builtin_mysql_password_plugin; 27 | 28 | struct st_mysql_plugin *mysql_optional_plugins[]= 29 | { 30 | @mysql_optional_plugins@ 0 31 | }; 32 | 33 | struct st_mysql_plugin *mysql_mandatory_plugins[]= 34 | { 35 | builtin_mysql_password_plugin, @mysql_mandatory_plugins@ 0 36 | }; 37 | -------------------------------------------------------------------------------- /sql/frm_crypt.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | 17 | /* 18 | ** change the following to the output of password('our password') 19 | ** split into 2 parts of 8 characters each. 20 | ** This is done to make it impossible to search after a text string in the 21 | ** mysql binary. 22 | */ 23 | 24 | #include "sql_priv.h" 25 | #include "frm_crypt.h" 26 | 27 | #ifdef HAVE_CRYPTED_FRM 28 | 29 | /* password('test') */ 30 | ulong password_seed[2]={0x378b243e, 0x220ca493}; 31 | 32 | SQL_CRYPT *get_crypt_for_frm(void) 33 | { 34 | return new SQL_CRYPT(password_seed); 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /sql-bench/Comments/Informix.crash-me: -------------------------------------------------------------------------------- 1 | ***************************************************************** 2 | NOTE: 3 | I, Monty, pulled this comment out from the public mail I got from 4 | Honza when he published the first crash-me run on Informix 5 | ***************************************************************** 6 | 7 | Also attached are diffs from server-cfg and crash-me -- some of 8 | them are actual bugs in the code, some add extensions for Informix, 9 | some of the comment-outs were necessary to finish the test. Some of 10 | the problematic pieces that are commented out sent Informix to 11 | veeeery long load 1 on the machine (max_conditions for example), so 12 | could be considered crashes, but I'd prefer that someone checks the 13 | code before giving out such a conclusion. 14 | 15 | Some of the code that is commented out failed with some other SQL 16 | error message which might mean a problem with the sequence of commands 17 | in crash-me. Interesting thing, some of the tests failed for the 18 | first time but in the next or third run went OK, so the results are 19 | results of more iterations (like column doesn't exist in the first 20 | try but the second pass goes OK). 21 | 22 | I'd like to hear your comments on the bug fixes and Informix specific 23 | code before we go into debugging the problems. 24 | 25 | Yours, 26 | Honza Pazdziora 27 | -------------------------------------------------------------------------------- /sql/mysqld_suffix.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSQLD_SUFFIX_INCLUDED 2 | #define MYSQLD_SUFFIX_INCLUDED 3 | 4 | /* Copyright (c) 2000, 2004, 2006, 2007 MySQL AB, 2009 Sun Microsystems, Inc. 5 | Use is subject to license terms. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; version 2 of the License. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software Foundation, 18 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 19 | 20 | /** 21 | @file 22 | 23 | Set MYSQL_SERVER_SUFFIX_STR. 24 | 25 | The following code is quite ugly as there is no portable way to easily set a 26 | string to the value of a macro 27 | */ 28 | 29 | #ifdef MYSQL_SERVER_SUFFIX 30 | #define MYSQL_SERVER_SUFFIX_STR STRINGIFY_ARG(MYSQL_SERVER_SUFFIX) 31 | #else 32 | #define MYSQL_SERVER_SUFFIX_STR MYSQL_SERVER_SUFFIX_DEF 33 | #endif 34 | #endif /* MYSQLD_SUFFIX_INCLUDED */ 35 | -------------------------------------------------------------------------------- /regex/README: -------------------------------------------------------------------------------- 1 | alpha3.4 release. 2 | Thu Mar 17 23:17:18 EST 1994 3 | henry@zoo.toronto.edu 4 | 5 | See WHATSNEW for change listing. 6 | 7 | installation notes: 8 | -------- 9 | Read the comments at the beginning of Makefile before running. 10 | 11 | Utils.h contains some things that just might have to be modified on 12 | some systems, as well as a nested include (ugh) of . 13 | 14 | The "fake" directory contains quick-and-dirty fakes for some header 15 | files and routines that old systems may not have. Note also that 16 | -DUSEBCOPY will make utils.h substitute bcopy() for memmove(). 17 | 18 | After that, "make r" will build regcomp.o, regexec.o, regfree.o, 19 | and regerror.o (the actual routines), bundle them together into a test 20 | program, and run regression tests on them. No output is good output. 21 | 22 | "make lib" builds just the .o files for the actual routines (when 23 | you're happy with testing and have adjusted CFLAGS for production), 24 | and puts them together into libregex.a. You can pick up either the 25 | library or *.o ("make lib" makes sure there are no other .o files left 26 | around to confuse things). 27 | 28 | Main.c, debug.c, split.c are used for regression testing but are not part 29 | of the RE routines themselves. 30 | 31 | Regex.h goes in /usr/include. All other .h files are internal only. 32 | -------- 33 | -------------------------------------------------------------------------------- /support-files/MacOSX/postflight.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (C) 2003, 2005 MySQL AB 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Library General Public 7 | # License as published by the Free Software Foundation; version 2 8 | # of the License. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General Public 16 | # License along with this library; if not, write to the Free 17 | # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | # MA 02111-1307, USA 19 | 20 | # 21 | # postflight - this script will be executed after the MySQL PKG 22 | # installation has been performed. 23 | # 24 | # This script will install the MySQL privilege tables using the 25 | # "mysql_install_db" script and will correct the ownerships of these files 26 | # afterwards. 27 | # 28 | 29 | if cd @prefix@ ; then 30 | if [ ! -f data/mysql/db.frm ] ; then 31 | ./scripts/mysql_install_db --rpm 32 | fi 33 | 34 | if [ -d data ] ; then 35 | chown -R @MYSQLD_USER@ data 36 | fi 37 | else 38 | exit $? 39 | fi 40 | -------------------------------------------------------------------------------- /strings/strfill.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2001, 2006, 2007 MySQL AB 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | /* File : strfill.c 18 | Author : Monty 19 | Updated: 1987.04.16 20 | Defines: strfill() 21 | 22 | strfill(dest, len, fill) makes a string of fill-characters. The result 23 | string is of length == len. The des+len character is allways set to NULL. 24 | strfill() returns pointer to dest+len; 25 | */ 26 | 27 | #include 28 | #include "m_string.h" 29 | 30 | char * strfill(char *s, size_t len, pchar fill) 31 | { 32 | while (len--) *s++ = fill; 33 | *(s) = '\0'; 34 | return(s); 35 | } /* strfill */ 36 | -------------------------------------------------------------------------------- /include/mysql/get_password.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | /* 17 | ** Ask for a password from tty 18 | ** This is an own file to avoid conflicts with curses 19 | */ 20 | 21 | #ifndef MYSQL_GET_PASSWORD_H_INCLUDED 22 | #define MYSQL_GET_PASSWORD_H_INCLUDED 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | typedef char *(* strdup_handler_t)(const char *, int); 29 | char *get_tty_password_ext(const char *opt_message, 30 | strdup_handler_t strdup_function); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* ! MYSQL_GET_PASSWORD_H_INCLUDED */ 37 | -------------------------------------------------------------------------------- /mysys/my_timer_cycles.il: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008 MySQL AB, 2009 Sun Microsystems, Inc. 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | /* Sun Studio SPARC inline templates for cycle timer */ 18 | /* Sun Studio i386 and x86_64 inline templates for cycle timer */ 19 | /* I didn't say ".volatile" or ".nonvolatile". */ 20 | 21 | .inline my_timer_cycles_il_sparc64,0 22 | rd %tick,%o0 23 | .end 24 | 25 | .inline my_timer_cycles_il_sparc32,0 26 | rd %tick,%o2 27 | srlx %o2,32,%o0 28 | sra %o2,0,%o1 29 | .end 30 | 31 | .inline my_timer_cycles_il_i386,0 32 | rdtsc 33 | .end 34 | 35 | .inline my_timer_cycles_il_x86_64,0 36 | rdtsc 37 | shlq $32,%rdx 38 | orq %rdx,%rax 39 | .end 40 | -------------------------------------------------------------------------------- /support-files/MacOSX/StartupParameters.plist.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | Description 22 | MySQL @VERSION@@MYSQL_SERVER_SUFFIX@ 23 | OrderPreference 24 | None 25 | Provides 26 | 27 | MySQL 28 | 29 | Uses 30 | 31 | Network 32 | Resolver 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /packaging/rpm-uln/mysql-5.5-libdir.patch: -------------------------------------------------------------------------------- 1 | The RPMs built by MySQL AB (-> Sun -> Oracle) put the libraries into "/usr/lib". 2 | Those built by RedHat put them into "/usr/lib/mysql". 3 | This patch is to modify the cmake files to follow the RedHat convention. 4 | Similar, the server is now in "/usr/libexec" (formerly "/usr/sbin"). 5 | 6 | 7 | diff -Naur mysql-5.5.17.orig/cmake/install_layout.cmake mysql-5.5.17/cmake/install_layout.cmake 8 | --- mysql-5.5.17.orig/cmake/install_layout.cmake 2011-06-30 15:46:53 +0000 9 | +++ mysql-5.5.17/cmake/install_layout.cmake 2011-10-27 16:40:10 +0000 10 | @@ -140,14 +140,14 @@ SET(INSTALL_SBINDIR_RPM 11 | # be applied at build time via "rpmbuild". 12 | # 13 | SET(INSTALL_BINDIR_RPM "bin") 14 | -SET(INSTALL_SBINDIR_RPM "sbin") 15 | +SET(INSTALL_SBINDIR_RPM "libexec") 16 | SET(INSTALL_SCRIPTDIR_RPM "bin") 17 | # 18 | IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") 19 | - SET(INSTALL_LIBDIR_RPM "lib64") 20 | + SET(INSTALL_LIBDIR_RPM "lib64/mysql") 21 | SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") 22 | ELSE() 23 | - SET(INSTALL_LIBDIR_RPM "lib") 24 | + SET(INSTALL_LIBDIR_RPM "lib/mysql") 25 | SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin") 26 | ENDIF() 27 | # 28 | 29 | -------------------------------------------------------------------------------- /strings/strnmov.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2001, 2006, 2007 MySQL AB 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | /* 18 | strnmov(dst,src,length) moves length characters, or until end, of src to 19 | dst and appends a closing NUL to dst if src is shorter than length. 20 | The result is a pointer to the first NUL in dst, or is dst+n if dst was 21 | truncated. 22 | */ 23 | 24 | #include 25 | #include "m_string.h" 26 | 27 | char *strnmov(register char *dst, register const char *src, size_t n) 28 | { 29 | while (n-- != 0) { 30 | if (!(*dst++ = *src++)) { 31 | return (char*) dst-1; 32 | } 33 | } 34 | return dst; 35 | } 36 | -------------------------------------------------------------------------------- /BUILD/cmake_configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Library General Public 7 | # License as published by the Free Software Foundation; version 2 8 | # of the License. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General Public 16 | # License along with this library; if not, write to the Free 17 | # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 18 | # MA 02110-1301, USA 19 | 20 | # Ensure cmake and perl are there 21 | cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no 22 | perl --version >/dev/null 2>&1 || HAVE_PERL=no 23 | scriptdir=`dirname $0` 24 | if test "$HAVE_CMAKE" = "no" 25 | then 26 | echo "CMake is required to build MySQL." 27 | exit 1 28 | elif test "$HAVE_PERL" = "no" 29 | then 30 | echo "Perl is required to build MySQL using the configure to CMake translator." 31 | exit 1 32 | else 33 | perl $scriptdir/cmake/configure.pl "$@" 34 | fi 35 | 36 | -------------------------------------------------------------------------------- /strings/strcend.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | /* File : strcend.c 17 | Author : Michael Widenius: ifdef MC68000 18 | Updated: 20 April 1984 19 | Defines: strcend() 20 | 21 | strcend(s, c) returns a pointer to the first place in s where c 22 | occurs, or a pointer to the end-null of s if c does not occur in s. 23 | */ 24 | 25 | #include 26 | #include "m_string.h" 27 | 28 | char *strcend(register const char *s, register pchar c) 29 | { 30 | for (;;) 31 | { 32 | if (*s == (char) c) return (char*) s; 33 | if (!*s++) return (char*) s-1; 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /unittest/examples/skip_all-t.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | 21 | int has_feature() { 22 | return 0; 23 | } 24 | 25 | /* 26 | In some cases, an entire test file does not make sense because there 27 | some feature is missing. In that case, the entire test case can be 28 | skipped in the following manner. 29 | */ 30 | int main() { 31 | if (!has_feature()) 32 | skip_all("Example of skipping an entire test"); 33 | plan(4); 34 | ok1(1); 35 | ok1(1); 36 | ok1(1); 37 | ok1(1); 38 | return exit_status(); 39 | } 40 | -------------------------------------------------------------------------------- /mysys/my_mess.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include "mysys_priv.h" 17 | 18 | void my_message_stderr(uint error __attribute__((unused)), 19 | const char *str, myf MyFlags) 20 | { 21 | DBUG_ENTER("my_message_stderr"); 22 | DBUG_PRINT("enter",("message: %s",str)); 23 | (void) fflush(stdout); 24 | if (MyFlags & ME_BELL) 25 | (void) fputc('\007', stderr); 26 | if (my_progname) 27 | { 28 | (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); 29 | } 30 | (void)fputs(str,stderr); 31 | (void)fputc('\n',stderr); 32 | (void)fflush(stderr); 33 | DBUG_VOID_RETURN; 34 | } 35 | -------------------------------------------------------------------------------- /support-files/binary-configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SCRIPT_NAME="`basename $0`" 4 | 5 | usage() 6 | { 7 | echo "Usage: ${SCRIPT_NAME} [--help|-h]" 8 | echo "" 9 | echo "This script creates the MySQL system tables and starts the server." 10 | } 11 | 12 | for arg do 13 | case "$arg" in 14 | --help|-h) 15 | usage 16 | exit 0 17 | ;; 18 | *) 19 | echo "${SCRIPT_NAME}: unknown option $arg" 20 | usage 21 | exit 2 22 | ;; 23 | esac 24 | done 25 | 26 | if test ! -x ./scripts/mysql_install_db 27 | then 28 | echo "I didn't find the script './scripts/mysql_install_db'." 29 | echo "Please execute this script in the mysql distribution directory!" 30 | exit 1; 31 | fi 32 | 33 | echo "NOTE: This is a MySQL binary distribution. It's ready to run, you don't" 34 | echo "need to configure it!" 35 | echo "" 36 | echo "To help you a bit, I am now going to create the needed MySQL databases" 37 | echo "and start the MySQL server for you. If you run into any trouble, please" 38 | echo "consult the MySQL manual, that you can find in the Docs directory." 39 | echo "" 40 | 41 | ./scripts/mysql_install_db --no-defaults 42 | if [ $? = 0 ] 43 | then 44 | echo "Starting the mysqld server. You can test that it is up and running" 45 | echo "with the command:" 46 | echo "./bin/mysqladmin version" 47 | ./bin/mysqld_safe --no-defaults & 48 | fi 49 | --------------------------------------------------------------------------------