http://bugs.mysql.com/bug.php?id=7971

Bastian Balthazar Bux <[email protected]> Wed, 13 Apr 2005 11:28:27 +0200
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
attached patch for the bug (I can't submit on it)

it is named for 4.1.11 but has been only compiled onto 5.0.5 .
At a first look seems it should apply to mysql 4.1 series too.

Best regards
Francesco Riosa

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
mysql-set_bit-4.1.11.patch (text/x-patch, 2.6 KB)
--- mysql.old/libmysqld/examples/mysqltest.c	2005-04-13 10:34:41.000000000 +0200
+++ mysql-5.0.5-beta-nightly-20050410/libmysqld/examples/mysqltest.c	2005-04-13 10:36:04.000000000 +0200
@@ -4196,8 +4196,8 @@
 static void make_sets_invisible(REP_SETS *sets);
 static void free_last_set(REP_SETS *sets);
 static void free_sets(REP_SETS *sets);
-static void set_bit(REP_SET *set, uint bit);
-static void clear_bit(REP_SET *set, uint bit);
+static void ex_set_bit(REP_SET *set, uint bit);
+static void ex_clear_bit(REP_SET *set, uint bit);
 static void or_bits(REP_SET *to,REP_SET *from);
 static void copy_bits(REP_SET *to,REP_SET *from);
 static int cmp_bits(REP_SET *set1,REP_SET *set2);
@@ -4274,7 +4274,7 @@
   {
     if (from[i][0] == '\\' && from[i][1] == '^')
     {
-      set_bit(start_states,states+1);
+      ex_set_bit(start_states,states+1);
       if (!from[i][2])
       {
 	start_states->table_offset=i;
@@ -4283,8 +4283,8 @@
     }
     else if (from[i][0] == '\\' && from[i][1] == '$')
     {
-      set_bit(start_states,states);
-      set_bit(word_states,states);
+      ex_set_bit(start_states,states);
+      ex_set_bit(word_states,states);
       if (!from[i][2] && start_states->table_offset == (uint) ~0)
       {
 	start_states->table_offset=i;
@@ -4293,11 +4293,11 @@
     }
     else
     {
-      set_bit(word_states,states);
+      ex_set_bit(word_states,states);
       if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2]))
-	set_bit(start_states,states+1);
+	ex_set_bit(start_states,states+1);
       else
-	set_bit(start_states,states);
+	ex_set_bit(start_states,states);
     }
     for (pos=from[i], len=0; *pos ; pos++)
     {
@@ -4403,9 +4403,9 @@
 		follow[i].len > found_end)
 	      found_end=follow[i].len;
 	    if (chr && follow[i].chr)
-	      set_bit(new_set,i+1);		/* To next set */
+	      ex_set_bit(new_set,i+1);		/* To next set */
 	    else
-	      set_bit(new_set,i);
+	      ex_set_bit(new_set,i);
 	  }
 	}
 	if (found_end)
@@ -4422,7 +4422,7 @@
 	    if (follow[bit_nr-1].len < found_end ||
 		(new_set->found_len &&
 		 (chr == 0 || !follow[bit_nr].chr)))
-	      clear_bit(new_set,i);
+	      ex_clear_bit(new_set,i);
 	    else
 	    {
 	      if (chr == 0 || !follow[bit_nr].chr)
@@ -4571,13 +4571,13 @@
   return;
 }
 
-static void set_bit(REP_SET *set, uint bit)
+static void ex_set_bit(REP_SET *set, uint bit)
 {
   set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT);
   return;
 }
 
-static void clear_bit(REP_SET *set, uint bit)
+static void ex_clear_bit(REP_SET *set, uint bit)
 {
   set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT));
   return;