Hi Alik,
On 8/26/09 12:05 PM, Alexander Nozdrin wrote:
> #At file:///mnt/raid/alik/MySQL/bzr/bug45118/5.1-bugteam-bug45118/ based on
> revid:davi.arnaut@stripped
>
> 3082 Alexander Nozdrin 2009-08-26
> A patch for Bug#45118 (mysqld.exe crashed in debug mode
> on Windows in dbug.c) -- part 2: a patch for the DBUG subsystem
> to detect misuse of DBUG_ENTER / DBUG_RETURN macros.
> 5.1 version.
>
> modified:
> client/mysqltest.cc
> include/my_dbug.h
> sql/sql_insert.cc
> sql/sql_parse.cc
> === modified file 'client/mysqltest.cc'
> --- a/client/mysqltest.cc 2009-06-29 14:00:47 +0000
> +++ b/client/mysqltest.cc 2009-08-26 15:05:02 +0000
> @@ -1163,6 +1163,7 @@ void free_used_memory()
> mysql_server_end();
>
> /* Don't use DBUG after mysql_server_end() */
> + DBUG_VIOLATION_HELPER_LEAVE;
> return;
> }
>
> @@ -8122,6 +8123,8 @@ void do_get_replace_column(struct st_com
> }
> my_free(start, MYF(0));
> command->last_argument= command->end;
> +
> + DBUG_VOID_RETURN;
> }
>
>
>
> === modified file 'include/my_dbug.h'
> --- a/include/my_dbug.h 2009-05-15 12:57:51 +0000
> +++ b/include/my_dbug.h 2009-08-26 15:05:02 +0000
> @@ -16,6 +16,29 @@
> #ifndef _dbug_h
> #define _dbug_h
>
> +#ifdef __cplusplus
On a second thought, it would be better to:
#if defined(__cplusplus) && !defined(DBUG_OFF).
As to not cause noise for non-debug builds.
Sorry for the poor suggestion.
Otherwise, looks good. OK to push.