List:Internals« Previous MessageNext Message »
From:Patrick Galbraith Date:November 1 2005 2:17am
Subject:bk commit into 5.0 tree (patg:1.1958) BUG#14532
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of patg. When patg 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
  1.1958 05/10/31 17:17:16 patg@stripped +3 -0
  BUG #14532
  
  Added FIELD_TYPE_BIT to field method 'needs_quotes' to make BIT columns
  work.

  sql/field.cc
    1.288 05/10/31 17:06:56 patg@stripped +1 -0
    BUG #14532
    
    Just needed to quote/escape bit field, add FIELD_TYPE_BIT to switch

  mysql-test/t/federated.test
    1.18 05/10/31 17:06:56 patg@stripped +34 -0
    BUG# 14532
    
    Test fix by creating table with bit column and inserting,selecting

  mysql-test/r/federated.result
    1.21 05/10/31 17:06:56 patg@stripped +53 -0
    BUG# 14532
    
    Test fix by creating table with bit column and inserting,selecting

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	patg
# Host:	krsna.patg.net
# Root:	/home/patg/mysql-build/mysql-5.0.test2

--- 1.287/sql/field.cc	2005-10-31 01:42:28 -08:00
+++ 1.288/sql/field.cc	2005-10-31 17:06:56 -08:00
@@ -1628,6 +1628,7 @@
   case FIELD_TYPE_MEDIUM_BLOB :
   case FIELD_TYPE_LONG_BLOB :
   case FIELD_TYPE_GEOMETRY :
+  case FIELD_TYPE_BIT:
     DBUG_RETURN(1);
 
   case FIELD_TYPE_DECIMAL : 

--- 1.20/mysql-test/r/federated.result	2005-10-13 07:18:57 -07:00
+++ 1.21/mysql-test/r/federated.result	2005-10-31 17:06:56 -08:00
@@ -1490,6 +1490,59 @@
 DROP TABLE federated.alter_me;
 DROP TABLE federated.normal_table;
 DROP TABLE IF EXISTS federated.t1;
+CREATE TABLE federated.t1 (
+`bitty` bit(3)
+) DEFAULT CHARSET=latin1;
+DROP TABLE IF EXISTS federated.t1;
+CREATE TABLE federated.t1 (
+`bitty` bit(3)
+) ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@stripped:SLAVE_PORT/federated/t1';
+INSERT INTO federated.t1 VALUES (b'001');
+INSERT INTO federated.t1 VALUES (b'010');
+INSERT INTO federated.t1 VALUES (b'011');
+INSERT INTO federated.t1 VALUES (b'100');
+INSERT INTO federated.t1 VALUES (b'101');
+INSERT INTO federated.t1 VALUES (b'110');
+INSERT INTO federated.t1 VALUES (b'111');
+select * FROM federated.t1;
+bitty
+
+
+
+
+
+
+
+select * FROM federated.t1;
+bitty
+
+
+
+
+
+
+
+delete from federated.t1;
+INSERT INTO federated.t1 VALUES (b'001');
+INSERT INTO federated.t1 VALUES (b'010');
+INSERT INTO federated.t1 VALUES (b'011');
+INSERT INTO federated.t1 VALUES (b'100');
+INSERT INTO federated.t1 VALUES (b'101');
+INSERT INTO federated.t1 VALUES (b'110');
+INSERT INTO federated.t1 VALUES (b'111');
+select * FROM federated.t1;
+bitty
+
+
+
+
+
+
+
+drop table federated.t1;
+drop table federated.t1;
+DROP TABLE IF EXISTS federated.t1;
 DROP DATABASE IF EXISTS federated;
 DROP TABLE IF EXISTS federated.t1;
 DROP DATABASE IF EXISTS federated;

--- 1.17/mysql-test/t/federated.test	2005-10-13 07:18:57 -07:00
+++ 1.18/mysql-test/t/federated.test	2005-10-31 17:06:56 -08:00
@@ -1188,5 +1188,39 @@
 DROP TABLE federated.normal_table;
 # END ALTER TEST
 
+#
+# Test BUG #14532
+#
+--disable_warnings
+DROP TABLE IF EXISTS federated.t1;
+--enable_warnings
+CREATE TABLE federated.t1 (
+  `bitty` bit(3)
+) DEFAULT CHARSET=latin1;
+
+connection master;
+
+--disable_warnings
+DROP TABLE IF EXISTS federated.t1;
+--enable_warnings
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval CREATE TABLE federated.t1 (
+ `bitty` bit(3)
+) ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+  CONNECTION='mysql://root@stripped:$SLAVE_MYPORT/federated/t1';
+
+INSERT INTO federated.t1 VALUES (b'001');
+INSERT INTO federated.t1 VALUES (b'010');
+INSERT INTO federated.t1 VALUES (b'011');
+INSERT INTO federated.t1 VALUES (b'100');
+INSERT INTO federated.t1 VALUES (b'101');
+INSERT INTO federated.t1 VALUES (b'110');
+INSERT INTO federated.t1 VALUES (b'111');
+select * FROM federated.t1;
+drop table federated.t1;
+
+connection slave;
+drop table federated.t1;
 
 source include/federated_cleanup.inc;
Thread
bk commit into 5.0 tree (patg:1.1958) BUG#14532Patrick Galbraith1 Nov