diff options
Diffstat (limited to 'dbug')
-rw-r--r-- | dbug/dbug.c | 14 | ||||
-rw-r--r-- | dbug/factorial.c | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c index ef63f660543..6a17db588ad 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -2375,4 +2375,18 @@ va_list ap; #endif /* NO_VARARGS */ +#else + +/* + * Dummy function, workaround for MySQL bug#14420 related + * build failure on a platform where linking with an empty + * archive fails. + * + * This block can be removed as soon as a fix for bug#14420 + * is implemented. + */ +int i_am_a_dummy_function() { + return 0; +} + #endif diff --git a/dbug/factorial.c b/dbug/factorial.c index 56197aef29e..7b190ea8d8e 100644 --- a/dbug/factorial.c +++ b/dbug/factorial.c @@ -1,6 +1,13 @@ #ifdef DBUG_OFF /* We are testing dbug */ -#undef DBUG_OFF -#endif + +int factorial(register int value) { + if(value > 1) { + value *= factorial(value-1); + } + return value; +} + +#else #include <my_global.h> @@ -15,3 +22,6 @@ register int value) DBUG_PRINT ("result", ("result is %d", value)); DBUG_RETURN (value); } + +#endif + |