Loading .bzrignore +2 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,7 @@ mysql-test/*.ds? mysql-test/*.vcproj mysql-test/gmon.out mysql-test/install_test_db mysql-test/mtr mysql-test/mysql-test-run mysql-test/mysql-test-run.log mysql-test/mysql_test_run_new Loading Loading @@ -1170,6 +1171,7 @@ sql/*.ds? sql/*.vcproj sql/.gdbinit sql/client.c sql/f.c sql/gen_lex_hash sql/gmon.out sql/handlerton.cc Loading BUILD/SETUP.sh +3 −9 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ parse_options() ######################################################################## if ! test -f sql/mysqld.cc if test ! -f sql/mysqld.cc then echo "You must run this script from the MySQL top-level directory" exit 1 Loading Loading @@ -185,12 +185,6 @@ fi # (returns 0 if finds lines) if ccache -V > /dev/null 2>&1 then if ! (echo "$CC" | grep "ccache" > /dev/null) then CC="ccache $CC" fi if ! (echo "$CXX" | grep "ccache" > /dev/null) then CXX="ccache $CXX" fi echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC" echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX" fi BUILD/check-cpu +189 −186 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ # Check cpu of current machine and find the # best compiler optimization flags for gcc # # check_cpu () { if test -r /proc/cpuinfo ; then # on Linux (and others?) we can get detailed CPU information out of /proc cpuinfo="cat /proc/cpuinfo" Loading Loading @@ -121,7 +121,7 @@ esac if test -z "$cpu_arg"; then echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2 check_cpu_cflags="" return fi Loading Loading @@ -177,16 +177,17 @@ esac touch __test.c while [ "$cpu_arg" ] ; do echo -n testing $cpu_arg "... " # FIXME: echo -n isn't portable - see contortions autoconf goes through echo -n testing $cpu_arg "... " >&2 # compile check check_cpu_cflags=`eval echo $check_cpu_args` if $cc -c $check_cpu_cflags __test.c 2>/dev/null; then echo ok echo ok >&2 break; fi echo failed echo failed >&2 check_cpu_cflags="" # if compile failed: check whether it supports a predecessor of this CPU Loading @@ -212,4 +213,6 @@ while [ "$cpu_arg" ] ; do done rm __test.* } check_cpu bdb/CMakeLists.txt 0 → 100755 +44 −0 Original line number Diff line number Diff line SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/bdb/build_win32 ${CMAKE_SOURCE_DIR}/bdb/dbinc ${CMAKE_SOURCE_DIR}/bdb) # BDB needs a number of source files that are auto-generated by the unix # configure. So to build BDB, it is necessary to copy these over to the Windows # bitkeeper tree, or to use a source .tar.gz package which already has these # files. ADD_LIBRARY(bdb btree/bt_compare.c btree/bt_conv.c btree/bt_curadj.c btree/bt_cursor.c btree/bt_delete.c btree/bt_method.c btree/bt_open.c btree/bt_put.c btree/bt_rec.c btree/bt_reclaim.c btree/bt_recno.c btree/bt_rsearch.c btree/bt_search.c btree/bt_split.c btree/bt_stat.c btree/bt_upgrade.c btree/bt_verify.c btree/btree_auto.c db/crdel_auto.c db/crdel_rec.c db/db.c db/db_am.c db/db_auto.c common/db_byteorder.c db/db_cam.c db/db_conv.c db/db_dispatch.c db/db_dup.c common/db_err.c common/db_getlong.c common/db_idspace.c db/db_iface.c db/db_join.c common/db_log2.c db/db_meta.c db/db_method.c db/db_open.c db/db_overflow.c db/db_pr.c db/db_rec.c db/db_reclaim.c db/db_remove.c db/db_rename.c db/db_ret.c env/db_salloc.c env/db_shash.c db/db_truncate.c db/db_upg.c db/db_upg_opd.c db/db_vrfy.c db/db_vrfyutil.c dbm/dbm.c dbreg/dbreg.c dbreg/dbreg_auto.c dbreg/dbreg_rec.c dbreg/dbreg_util.c env/env_file.c env/env_method.c env/env_open.c env/env_recover.c env/env_region.c fileops/fileops_auto.c fileops/fop_basic.c fileops/fop_rec.c fileops/fop_util.c hash/hash.c hash/hash_auto.c hash/hash_conv.c hash/hash_dup.c hash/hash_func.c hash/hash_meta.c hash/hash_method.c hash/hash_open.c hash/hash_page.c hash/hash_rec.c hash/hash_reclaim.c hash/hash_stat.c hash/hash_upgrade.c hash/hash_verify.c hmac/hmac.c hsearch/hsearch.c lock/lock.c lock/lock_deadlock.c lock/lock_method.c lock/lock_region.c lock/lock_stat.c lock/lock_util.c log/log.c log/log_archive.c log/log_compare.c log/log_get.c log/log_method.c log/log_put.c mp/mp_alloc.c mp/mp_bh.c mp/mp_fget.c mp/mp_fopen.c mp/mp_fput.c mp/mp_fset.c mp/mp_method.c mp/mp_region.c mp/mp_register.c mp/mp_stat.c mp/mp_sync.c mp/mp_trickle.c mutex/mut_tas.c mutex/mut_win32.c mutex/mutex.c os_win32/os_abs.c os/os_alloc.c os_win32/os_clock.c os_win32/os_config.c os_win32/os_dir.c os_win32/os_errno.c os_win32/os_fid.c os_win32/os_fsync.c os_win32/os_handle.c os/os_id.c os_win32/os_map.c os/os_method.c os/os_oflags.c os_win32/os_open.c os/os_region.c os_win32/os_rename.c os/os_root.c os/os_rpath.c os_win32/os_rw.c os_win32/os_seek.c os_win32/os_sleep.c os_win32/os_spin.c os_win32/os_stat.c os/os_tmpdir.c os_win32/os_type.c os/os_unlink.c qam/qam.c qam/qam_auto.c qam/qam_conv.c qam/qam_files.c qam/qam_method.c qam/qam_open.c qam/qam_rec.c qam/qam_stat.c qam/qam_upgrade.c qam/qam_verify.c rep/rep_method.c rep/rep_record.c rep/rep_region.c rep/rep_util.c hmac/sha1.c clib/strcasecmp.c txn/txn.c txn/txn_auto.c txn/txn_method.c txn/txn_rec.c txn/txn_recover.c txn/txn_region.c txn/txn_stat.c txn/txn_util.c common/util_log.c common/util_sig.c xa/xa.c xa/xa_db.c xa/xa_map.c) client/mysql.cc +12 −35 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ static void end_timer(ulong start_time,char *buff); static void mysql_end_timer(ulong start_time,char *buff); static void nice_time(double sec,char *buff,bool part_second); static sig_handler mysql_end(int sig); static sig_handler mysql_sigint(int sig); static sig_handler handle_sigint(int sig); int main(int argc,char *argv[]) { Loading Loading @@ -420,8 +420,7 @@ int main(int argc,char *argv[]) if (opt_sigint_ignore) signal(SIGINT, SIG_IGN); else signal(SIGINT, mysql_sigint); // Catch SIGINT to clean up signal(SIGINT, handle_sigint); // Catch SIGINT to clean up signal(SIGQUIT, mysql_end); // Catch SIGQUIT to clean up /* Loading Loading @@ -489,28 +488,6 @@ int main(int argc,char *argv[]) #endif } sig_handler mysql_sigint(int sig) { char kill_buffer[40]; MYSQL *kill_mysql= NULL; signal(SIGINT, mysql_sigint); /* terminate if no query being executed, or we already tried interrupting */ if (!executing_query || interrupted_query++) mysql_end(sig); kill_mysql= mysql_init(kill_mysql); if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password, "", opt_mysql_port, opt_mysql_unix_port,0)) mysql_end(sig); /* kill_buffer is always big enough because max length of %lu is 15 */ sprintf(kill_buffer, "KILL /*!50000 QUERY */ %lu", mysql_thread_id(&mysql)); mysql_real_query(kill_mysql, kill_buffer, strlen(kill_buffer)); mysql_close(kill_mysql); tee_fprintf(stdout, "Query aborted by Ctrl+C\n"); } sig_handler mysql_end(int sig) { mysql_close(&mysql); Loading Loading @@ -1058,8 +1035,6 @@ static int read_and_execute(bool interactive) if (opt_outfile && glob_buffer.is_empty()) fflush(OUTFILE); interrupted_query= 0; #if defined( __WIN__) || defined(__NETWARE__) tee_fputs(prompt, stdout); #if defined(__NETWARE__) Loading Loading @@ -1982,6 +1957,9 @@ com_charset(String *buffer __attribute__((unused)), char *line) if (new_cs) { charset_info= new_cs; mysql_set_character_set(&mysql, charset_info->csname); default_charset= (char *)charset_info->csname; default_charset_used= 1; put_info("Charset changed", INFO_INFO); } else put_info("Charset is not found", INFO_INFO); Loading Loading @@ -2041,9 +2019,7 @@ com_go(String *buffer,char *line __attribute__((unused))) } timer=start_timer(); executing_query= 1; error= mysql_real_query_for_lazy(buffer->ptr(),buffer->length()); #ifdef HAVE_READLINE Loading @@ -2059,7 +2035,6 @@ com_go(String *buffer,char *line __attribute__((unused))) { executing_query= 0; buffer->length(0); // Remove query on error executing_query= 0; return error; } error=0; Loading Loading @@ -2143,9 +2118,6 @@ com_go(String *buffer,char *line __attribute__((unused))) fflush(stdout); mysql_free_result(result); } while (!(err= mysql_next_result(&mysql))); executing_query= 0; if (err >= 1) error= put_error(&mysql); Loading Loading @@ -2362,7 +2334,12 @@ print_table_data(MYSQL_RES *result) (void) tee_fputs("|", PAGER); for (uint off=0; (field = mysql_fetch_field(result)) ; off++) { tee_fprintf(PAGER, " %-*s |",(int) min(field->max_length, uint name_length= (uint) strlen(field->name); uint numcells= charset_info->cset->numcells(charset_info, field->name, field->name + name_length); uint display_length= field->max_length + name_length - numcells; tee_fprintf(PAGER, " %-*s |",(int) min(display_length, MAX_COLUMN_LENGTH), field->name); num_flag[off]= IS_NUM(field->type); Loading Loading
.bzrignore +2 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,7 @@ mysql-test/*.ds? mysql-test/*.vcproj mysql-test/gmon.out mysql-test/install_test_db mysql-test/mtr mysql-test/mysql-test-run mysql-test/mysql-test-run.log mysql-test/mysql_test_run_new Loading Loading @@ -1170,6 +1171,7 @@ sql/*.ds? sql/*.vcproj sql/.gdbinit sql/client.c sql/f.c sql/gen_lex_hash sql/gmon.out sql/handlerton.cc Loading
BUILD/SETUP.sh +3 −9 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ parse_options() ######################################################################## if ! test -f sql/mysqld.cc if test ! -f sql/mysqld.cc then echo "You must run this script from the MySQL top-level directory" exit 1 Loading Loading @@ -185,12 +185,6 @@ fi # (returns 0 if finds lines) if ccache -V > /dev/null 2>&1 then if ! (echo "$CC" | grep "ccache" > /dev/null) then CC="ccache $CC" fi if ! (echo "$CXX" | grep "ccache" > /dev/null) then CXX="ccache $CXX" fi echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC" echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX" fi
BUILD/check-cpu +189 −186 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ # Check cpu of current machine and find the # best compiler optimization flags for gcc # # check_cpu () { if test -r /proc/cpuinfo ; then # on Linux (and others?) we can get detailed CPU information out of /proc cpuinfo="cat /proc/cpuinfo" Loading Loading @@ -121,7 +121,7 @@ esac if test -z "$cpu_arg"; then echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2 check_cpu_cflags="" return fi Loading Loading @@ -177,16 +177,17 @@ esac touch __test.c while [ "$cpu_arg" ] ; do echo -n testing $cpu_arg "... " # FIXME: echo -n isn't portable - see contortions autoconf goes through echo -n testing $cpu_arg "... " >&2 # compile check check_cpu_cflags=`eval echo $check_cpu_args` if $cc -c $check_cpu_cflags __test.c 2>/dev/null; then echo ok echo ok >&2 break; fi echo failed echo failed >&2 check_cpu_cflags="" # if compile failed: check whether it supports a predecessor of this CPU Loading @@ -212,4 +213,6 @@ while [ "$cpu_arg" ] ; do done rm __test.* } check_cpu
bdb/CMakeLists.txt 0 → 100755 +44 −0 Original line number Diff line number Diff line SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/bdb/build_win32 ${CMAKE_SOURCE_DIR}/bdb/dbinc ${CMAKE_SOURCE_DIR}/bdb) # BDB needs a number of source files that are auto-generated by the unix # configure. So to build BDB, it is necessary to copy these over to the Windows # bitkeeper tree, or to use a source .tar.gz package which already has these # files. ADD_LIBRARY(bdb btree/bt_compare.c btree/bt_conv.c btree/bt_curadj.c btree/bt_cursor.c btree/bt_delete.c btree/bt_method.c btree/bt_open.c btree/bt_put.c btree/bt_rec.c btree/bt_reclaim.c btree/bt_recno.c btree/bt_rsearch.c btree/bt_search.c btree/bt_split.c btree/bt_stat.c btree/bt_upgrade.c btree/bt_verify.c btree/btree_auto.c db/crdel_auto.c db/crdel_rec.c db/db.c db/db_am.c db/db_auto.c common/db_byteorder.c db/db_cam.c db/db_conv.c db/db_dispatch.c db/db_dup.c common/db_err.c common/db_getlong.c common/db_idspace.c db/db_iface.c db/db_join.c common/db_log2.c db/db_meta.c db/db_method.c db/db_open.c db/db_overflow.c db/db_pr.c db/db_rec.c db/db_reclaim.c db/db_remove.c db/db_rename.c db/db_ret.c env/db_salloc.c env/db_shash.c db/db_truncate.c db/db_upg.c db/db_upg_opd.c db/db_vrfy.c db/db_vrfyutil.c dbm/dbm.c dbreg/dbreg.c dbreg/dbreg_auto.c dbreg/dbreg_rec.c dbreg/dbreg_util.c env/env_file.c env/env_method.c env/env_open.c env/env_recover.c env/env_region.c fileops/fileops_auto.c fileops/fop_basic.c fileops/fop_rec.c fileops/fop_util.c hash/hash.c hash/hash_auto.c hash/hash_conv.c hash/hash_dup.c hash/hash_func.c hash/hash_meta.c hash/hash_method.c hash/hash_open.c hash/hash_page.c hash/hash_rec.c hash/hash_reclaim.c hash/hash_stat.c hash/hash_upgrade.c hash/hash_verify.c hmac/hmac.c hsearch/hsearch.c lock/lock.c lock/lock_deadlock.c lock/lock_method.c lock/lock_region.c lock/lock_stat.c lock/lock_util.c log/log.c log/log_archive.c log/log_compare.c log/log_get.c log/log_method.c log/log_put.c mp/mp_alloc.c mp/mp_bh.c mp/mp_fget.c mp/mp_fopen.c mp/mp_fput.c mp/mp_fset.c mp/mp_method.c mp/mp_region.c mp/mp_register.c mp/mp_stat.c mp/mp_sync.c mp/mp_trickle.c mutex/mut_tas.c mutex/mut_win32.c mutex/mutex.c os_win32/os_abs.c os/os_alloc.c os_win32/os_clock.c os_win32/os_config.c os_win32/os_dir.c os_win32/os_errno.c os_win32/os_fid.c os_win32/os_fsync.c os_win32/os_handle.c os/os_id.c os_win32/os_map.c os/os_method.c os/os_oflags.c os_win32/os_open.c os/os_region.c os_win32/os_rename.c os/os_root.c os/os_rpath.c os_win32/os_rw.c os_win32/os_seek.c os_win32/os_sleep.c os_win32/os_spin.c os_win32/os_stat.c os/os_tmpdir.c os_win32/os_type.c os/os_unlink.c qam/qam.c qam/qam_auto.c qam/qam_conv.c qam/qam_files.c qam/qam_method.c qam/qam_open.c qam/qam_rec.c qam/qam_stat.c qam/qam_upgrade.c qam/qam_verify.c rep/rep_method.c rep/rep_record.c rep/rep_region.c rep/rep_util.c hmac/sha1.c clib/strcasecmp.c txn/txn.c txn/txn_auto.c txn/txn_method.c txn/txn_rec.c txn/txn_recover.c txn/txn_region.c txn/txn_stat.c txn/txn_util.c common/util_log.c common/util_sig.c xa/xa.c xa/xa_db.c xa/xa_map.c)
client/mysql.cc +12 −35 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ static void end_timer(ulong start_time,char *buff); static void mysql_end_timer(ulong start_time,char *buff); static void nice_time(double sec,char *buff,bool part_second); static sig_handler mysql_end(int sig); static sig_handler mysql_sigint(int sig); static sig_handler handle_sigint(int sig); int main(int argc,char *argv[]) { Loading Loading @@ -420,8 +420,7 @@ int main(int argc,char *argv[]) if (opt_sigint_ignore) signal(SIGINT, SIG_IGN); else signal(SIGINT, mysql_sigint); // Catch SIGINT to clean up signal(SIGINT, handle_sigint); // Catch SIGINT to clean up signal(SIGQUIT, mysql_end); // Catch SIGQUIT to clean up /* Loading Loading @@ -489,28 +488,6 @@ int main(int argc,char *argv[]) #endif } sig_handler mysql_sigint(int sig) { char kill_buffer[40]; MYSQL *kill_mysql= NULL; signal(SIGINT, mysql_sigint); /* terminate if no query being executed, or we already tried interrupting */ if (!executing_query || interrupted_query++) mysql_end(sig); kill_mysql= mysql_init(kill_mysql); if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password, "", opt_mysql_port, opt_mysql_unix_port,0)) mysql_end(sig); /* kill_buffer is always big enough because max length of %lu is 15 */ sprintf(kill_buffer, "KILL /*!50000 QUERY */ %lu", mysql_thread_id(&mysql)); mysql_real_query(kill_mysql, kill_buffer, strlen(kill_buffer)); mysql_close(kill_mysql); tee_fprintf(stdout, "Query aborted by Ctrl+C\n"); } sig_handler mysql_end(int sig) { mysql_close(&mysql); Loading Loading @@ -1058,8 +1035,6 @@ static int read_and_execute(bool interactive) if (opt_outfile && glob_buffer.is_empty()) fflush(OUTFILE); interrupted_query= 0; #if defined( __WIN__) || defined(__NETWARE__) tee_fputs(prompt, stdout); #if defined(__NETWARE__) Loading Loading @@ -1982,6 +1957,9 @@ com_charset(String *buffer __attribute__((unused)), char *line) if (new_cs) { charset_info= new_cs; mysql_set_character_set(&mysql, charset_info->csname); default_charset= (char *)charset_info->csname; default_charset_used= 1; put_info("Charset changed", INFO_INFO); } else put_info("Charset is not found", INFO_INFO); Loading Loading @@ -2041,9 +2019,7 @@ com_go(String *buffer,char *line __attribute__((unused))) } timer=start_timer(); executing_query= 1; error= mysql_real_query_for_lazy(buffer->ptr(),buffer->length()); #ifdef HAVE_READLINE Loading @@ -2059,7 +2035,6 @@ com_go(String *buffer,char *line __attribute__((unused))) { executing_query= 0; buffer->length(0); // Remove query on error executing_query= 0; return error; } error=0; Loading Loading @@ -2143,9 +2118,6 @@ com_go(String *buffer,char *line __attribute__((unused))) fflush(stdout); mysql_free_result(result); } while (!(err= mysql_next_result(&mysql))); executing_query= 0; if (err >= 1) error= put_error(&mysql); Loading Loading @@ -2362,7 +2334,12 @@ print_table_data(MYSQL_RES *result) (void) tee_fputs("|", PAGER); for (uint off=0; (field = mysql_fetch_field(result)) ; off++) { tee_fprintf(PAGER, " %-*s |",(int) min(field->max_length, uint name_length= (uint) strlen(field->name); uint numcells= charset_info->cset->numcells(charset_info, field->name, field->name + name_length); uint display_length= field->max_length + name_length - numcells; tee_fprintf(PAGER, " %-*s |",(int) min(display_length, MAX_COLUMN_LENGTH), field->name); num_flag[off]= IS_NUM(field->type); Loading