diff options
author | unknown <lars@mysql.com> | 2004-12-03 15:18:25 +0100 |
---|---|---|
committer | unknown <lars@mysql.com> | 2004-12-03 15:18:25 +0100 |
commit | f2d6046eda1d0e210eb6aa68d6d604d2ef824918 (patch) | |
tree | a55fd718784f58219ca151ed1d98e1150b07cfdb /sql/slave.cc | |
parent | abf0ab9eee5070fd7bd6f284fec8a1ba0216ecb6 (diff) | |
download | mariadb-git-f2d6046eda1d0e210eb6aa68d6d604d2ef824918.tar.gz |
Due to a compiler bug, slave.cc:tables_ok() sometimes wrongly returns
1 if the return type is int or int_fast8_t. The test case that showed
this problem is rpl000001 and the tested version was MySQL 5.0.2. The
compiler with the problem is GCC 3.0.4 runing on "Linux bitch 2.4.18
#2 Thu Apr 11 14:37:17 EDT 2002 sparc64 unknown".
By changing the return type to bool the problem disappear. (Another
way to make the problem disappear is to simply print the returned
value with printf("%d",?). The printed returned value is always 0 in
the test cases I have run.) This is only a partial solution to the
problem, since someone could later change the return type of the
function back to int or some other type that does not work.
sql/slave.cc:
Changed type
sql/slave.h:
Changed type
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index b5caf2627a6..bd9650ed369 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -759,7 +759,7 @@ static TABLE_RULE_ENT* find_wild(DYNAMIC_ARRAY *a, const char* key, int len) 1 should be logged/replicated */ -int tables_ok(THD* thd, TABLE_LIST* tables) +bool tables_ok(THD* thd, TABLE_LIST* tables) { bool some_tables_updating= 0; DBUG_ENTER("tables_ok"); |