Changes looks good. I even got to refresh my knowledge of pointer
arithmetic :-)
+1 to push.
I have not tried to build this on windows, though.
--
Øystein
cbell@stripped wrote:
> Below is the list of changes that have just been committed into a local
> 6.0 repository of cbell. When cbell does a push these changes
> will be propagated to the main repository and, within 24 hours after the
> push, to the public repository.
> For information on how to access the public repository
> see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
>
> ChangeSet@stripped, 2008-05-28 11:25:24-04:00, cbell@mysql_cab_desk. +5 -0
> This patch corrects the following build problems from PB:
>
> 1) Code for debug_sync facility would not build on Windows
> 2) Compiler warnings
> 3) Test failure of debug_sync test due to merge from main
>
> CMakeLists.txt@stripped, 2008-05-28 11:25:16-04:00, cbell@mysql_cab_desk. +4 -0
> Adds definition of ENABLED_DEBUG_SYNC from WL#4259 to enable building
> with the new debug sync code on Windows.
>
> mysql-test/r/debug_sync.result@stripped, 2008-05-28 11:25:16-04:00,
> cbell@mysql_cab_desk. +1 -1
> New (corrected) result file.
>
> sql/backup/backup_info.cc@stripped, 2008-05-28 11:25:18-04:00, cbell@mysql_cab_desk. +1
> -1
> Corrects build warning for uninitialized variable.
>
> sql/debug_sync.cc@stripped, 2008-05-28 11:25:17-04:00, cbell@mysql_cab_desk. +3 -3
> Corrected build failure on Windows due to C vs. C++ function declaration.
> Corrected build warning concerning type matches in debug statements.
>
> win/configure.js@stripped, 2008-05-28 11:25:18-04:00, cbell@mysql_cab_desk. +1 -0
> Adds definition of ENABLED_DEBUG_SYNC from WL#4259 to enable building
> with the new debug sync code on Windows.
>
> diff -Nrup a/CMakeLists.txt b/CMakeLists.txt
> --- a/CMakeLists.txt 2008-05-08 11:57:38 -04:00
> +++ b/CMakeLists.txt 2008-05-28 11:25:16 -04:00
> @@ -106,6 +106,10 @@ IF(EXTRA_DEBUG)
> ADD_DEFINITIONS(-D EXTRA_DEBUG)
> ENDIF(EXTRA_DEBUG)
>
> +IF(ENABLED_DEBUG_SYNC)
> + ADD_DEFINITIONS(-D ENABLED_DEBUG_SYNC)
> +ENDIF(ENABLED_DEBUG_SYNC)
> +
> IF(BACKUP_TEST)
> ADD_DEFINITIONS(-D BACKUP_TEST)
> ENDIF(BACKUP_TEST)
> diff -Nrup a/mysql-test/r/debug_sync.result b/mysql-test/r/debug_sync.result
> --- a/mysql-test/r/debug_sync.result 2008-05-10 04:42:45 -04:00
> +++ b/mysql-test/r/debug_sync.result 2008-05-28 11:25:16 -04:00
> @@ -137,7 +137,7 @@ Variable_name Value
> debug_sync ON - current signal: 'something'
> SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0';
> Warnings:
> -Warning 1717 debug sync point wait timed out
> +Warning 1718 debug sync point wait timed out
> SET DEBUG_SYNC= 'now SIGNAL nothing';
> SHOW VARIABLES LIKE 'DEBUG_SYNC';
> Variable_name Value
> diff -Nrup a/sql/backup/backup_info.cc b/sql/backup/backup_info.cc
> --- a/sql/backup/backup_info.cc 2008-05-17 12:06:53 -04:00
> +++ b/sql/backup/backup_info.cc 2008-05-28 11:25:18 -04:00
> @@ -407,7 +407,7 @@ backup::Image_info::Ts* Backup_info::add
> */
>
> Ts_hash_node n0(name);
> - size_t klen;
> + size_t klen= 0;
> uchar *key= Ts_hash_node::get_key((const uchar*)&n0, &klen, TRUE);
>
> Ts_hash_node *n1= (Ts_hash_node*) hash_search(&ts_hash, key, klen);
> diff -Nrup a/sql/debug_sync.cc b/sql/debug_sync.cc
> --- a/sql/debug_sync.cc 2008-04-29 05:22:02 -04:00
> +++ b/sql/debug_sync.cc 2008-05-28 11:25:17 -04:00
> @@ -261,7 +261,7 @@ static st_debug_sync_globals debug_sync_
> /**
> Callback pointer from thr_lock.cc
> */
> -extern void (*debug_sync_wait_for_lock_callback_ptr)(void);
> +extern "C" void (*debug_sync_wait_for_lock_callback_ptr)(void);
>
>
> /**
> @@ -815,7 +815,7 @@ static st_debug_sync_action *debug_sync_
> DBUG_ASSERT(name_len);
> DBUG_ASSERT(ds_control);
> DBUG_PRINT("debug_sync", ("sync_point: '%.*s'", (int) name_len, dsp_name));
> - DBUG_PRINT("debug_sync", ("active: %lu allocated: %lu",
> + DBUG_PRINT("debug_sync", ("active: %u allocated: %u",
> ds_control->ds_active,
> ds_control->ds_allocated));
>
> /* There cannot be more active actions than allocated. */
> @@ -829,7 +829,7 @@ static st_debug_sync_action *debug_sync_
> dsp_name, name_len)))
> {
> /* Reuse an already active sync point action. */
> - DBUG_ASSERT((action - ds_control->ds_action) < ds_control->ds_active);
> + DBUG_ASSERT((uint)(action - ds_control->ds_action) <
> ds_control->ds_active);
> DBUG_PRINT("debug_sync", ("reuse action idx: %ld",
> action - ds_control->ds_action));
> }
> diff -Nrup a/win/configure.js b/win/configure.js
> --- a/win/configure.js 2008-01-10 16:52:43 -05:00
> +++ b/win/configure.js 2008-05-28 11:25:18 -04:00
> @@ -49,6 +49,7 @@ try
> case "__NT__":
> case "CYBOZU":
> case "EXTRA_DEBUG":
> + case "ENABLED_DEBUG_SYNC":
> case "BACKUP_TEST":
> case "EMBED_MANIFESTS":
> case "WITH_EMBEDDED_SERVER":
>
>
--
Øystein Grøvlen, Senior Staff Engineer
Architectural Lead, Java DB
Sun Microsystems, Database Technology Group
Trondheim, Norway