List:Internals« Previous MessageNext Message »
From:konstantin Date:July 14 2005 1:33pm
Subject:bk commit into 5.0 tree (konstantin:1.1931)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja 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.1931 05/07/14 17:33:05 konstantin@stripped +12 -0
  Merge mysql.com:/opt/local/work/mysql-4.1-root
  into  mysql.com:/opt/local/work/mysql-5.0-root

  sql/item_func.cc
    1.231 05/07/14 17:27:43 konstantin@stripped +0 -0
    Auto merged

  sql/sql_select.cc
    1.333 05/07/14 17:27:43 konstantin@stripped +0 -0
    Auto merged

  mysql-test/t/select.test
    1.53 05/07/14 17:32:59 konstantin@stripped +40 -41
    manual merge

  mysql-test/r/select.result
    1.69 05/07/14 17:32:59 konstantin@stripped +0 -0
    manual merge

  tests/mysql_client_test.c
    1.136 05/07/14 17:32:59 konstantin@stripped +26 -29
    manual merge

  sql/field.cc
    1.272 05/07/14 17:32:59 konstantin@stripped +1 -2
    manual merge

  mysql-test/r/ps_7ndb.result
    1.33 05/07/14 17:27:42 konstantin@stripped +0 -0
    Auto merged

  mysql-test/r/ps_6bdb.result
    1.33 05/07/14 17:27:42 konstantin@stripped +0 -0
    Auto merged

  mysql-test/r/ps_5merge.result
    1.30 05/07/14 17:27:42 konstantin@stripped +0 -0
    Auto merged

  mysql-test/r/ps_4heap.result
    1.29 05/07/14 17:27:42 konstantin@stripped +0 -0
    Auto merged

  mysql-test/r/ps_3innodb.result
    1.33 05/07/14 17:27:42 konstantin@stripped +0 -0
    Auto merged

  mysql-test/r/ps_2myisam.result
    1.30 05/07/14 17:27:42 konstantin@stripped +0 -0
    Auto merged

# 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:	konstantin
# Host:	dragonfly.local
# Root:	/opt/local/work/mysql-5.0-root/RESYNC

--- 1.271/sql/field.cc	2005-07-04 04:44:30 +04:00
+++ 1.272/sql/field.cc	2005-07-14 17:32:59 +04:00
@@ -47,6 +47,8 @@
 const char field_separator=',';
 
 #define DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE 320
+#define BLOB_PACK_LENGTH_TO_MAX_LENGH(arg) \
+((ulong) ((LL(1) << min(arg, 4) * 8) - LL(1)))
 
 /*
   Rules for merging different types of fields in UNION
@@ -6696,7 +6698,7 @@
 		       enum utype unireg_check_arg, const char *field_name_arg,
 		       struct st_table *table_arg,uint blob_pack_length,
 		       CHARSET_INFO *cs)
-  :Field_longstr(ptr_arg, (1L << min(blob_pack_length,3)*8)-1L,
+  :Field_longstr(ptr_arg, BLOB_PACK_LENGTH_TO_MAX_LENGH(blob_pack_length),
 	     null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg,
 	     table_arg, cs),
    packlength(blob_pack_length)

--- 1.230/sql/item_func.cc	2005-07-13 23:49:40 +04:00
+++ 1.231/sql/item_func.cc	2005-07-14 17:27:43 +04:00
@@ -4395,6 +4395,9 @@
 
   if (key == NO_SUCH_KEY)
     return 0;
+  
+  if (!table) 
+    goto err;
 
   for (keynr=0 ; keynr < table->s->keys ; keynr++)
   {

--- 1.332/sql/sql_select.cc	2005-07-14 15:27:14 +04:00
+++ 1.333/sql/sql_select.cc	2005-07-14 17:27:43 +04:00
@@ -5169,11 +5169,17 @@
           DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
           Item_field *not_null_item= (Item_field*)item;
           JOIN_TAB *referred_tab= not_null_item->field->table->reginfo.join_tab;
-          Item_func_isnotnull *notnull;
+          Item *notnull;
           if (!(notnull= new Item_func_isnotnull(not_null_item)))
             DBUG_VOID_RETURN;
-
-          notnull->quick_fix_field();
+          /*
+            We need to do full fix_fields() call here in order to have correct
+            notnull->const_item(). This is needed e.g. by test_quick_select 
+            when it is called from make_join_select after this function is 
+            called.
+          */
+          if (notnull->fix_fields(join->thd, join->tables_list, &notnull))
+            DBUG_VOID_RETURN;
           DBUG_EXECUTE("where",print_where(notnull,
                                            referred_tab->table->alias););
           add_cond_and_fix(&referred_tab->select_cond, notnull);

--- 1.29/mysql-test/r/ps_2myisam.result	2005-06-27 15:12:07 +04:00
+++ 1.30/mysql-test/r/ps_2myisam.result	2005-07-14 17:27:42 +04:00
@@ -77,8 +77,8 @@
 def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
 def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
 def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
-def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
-def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
+def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
+def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
 def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
 def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
 c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -1810,17 +1810,17 @@
 def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
 def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
 def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
 def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
 def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
 def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
 def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
 def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
 def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
 def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
 def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1828,8 +1828,8 @@
 def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
 def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
 def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
 const01	8
 param01	8
 const02	8.0

--- 1.32/mysql-test/r/ps_3innodb.result	2005-06-27 15:12:07 +04:00
+++ 1.33/mysql-test/r/ps_3innodb.result	2005-07-14 17:27:42 +04:00
@@ -77,8 +77,8 @@
 def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
 def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
 def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
-def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
-def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
+def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
+def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
 def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
 def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
 c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -1793,17 +1793,17 @@
 def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
 def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
 def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
 def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
 def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
 def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
 def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
 def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
 def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
 def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
 def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1811,8 +1811,8 @@
 def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
 def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
 def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
 const01	8
 param01	8
 const02	8.0

--- 1.28/mysql-test/r/ps_4heap.result	2005-06-27 15:12:07 +04:00
+++ 1.29/mysql-test/r/ps_4heap.result	2005-07-14 17:27:42 +04:00
@@ -1794,17 +1794,17 @@
 def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
 def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
 def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
 def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
 def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
 def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
 def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
 def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
 def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
 def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
 def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1812,8 +1812,8 @@
 def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
 def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
 def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
 const01	8
 param01	8
 const02	8.0

--- 1.29/mysql-test/r/ps_5merge.result	2005-06-27 15:12:07 +04:00
+++ 1.30/mysql-test/r/ps_5merge.result	2005-07-14 17:27:42 +04:00
@@ -120,8 +120,8 @@
 def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
 def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
 def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
-def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
-def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
+def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
+def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
 def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
 def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
 c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -1730,17 +1730,17 @@
 def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
 def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
 def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
 def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
 def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
 def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
 def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
 def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
 def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
 def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
 def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1748,8 +1748,8 @@
 def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
 def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
 def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
 const01	8
 param01	8
 const02	8.0
@@ -3132,8 +3132,8 @@
 def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
 def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
 def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
-def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
-def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
+def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
+def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
 def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
 def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
 c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -4742,17 +4742,17 @@
 def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
 def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
 def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
 def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
 def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
 def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
 def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
 def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
 def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
 def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
 def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -4760,8 +4760,8 @@
 def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
 def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
 def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
 const01	8
 param01	8
 const02	8.0

--- 1.32/mysql-test/r/ps_6bdb.result	2005-06-27 15:12:07 +04:00
+++ 1.33/mysql-test/r/ps_6bdb.result	2005-07-14 17:27:42 +04:00
@@ -77,8 +77,8 @@
 def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
 def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
 def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
-def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
-def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
+def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
+def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
 def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
 def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
 c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -1793,17 +1793,17 @@
 def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
 def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
 def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
 def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
 def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
 def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
 def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
 def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
 def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
 def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
 def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1811,8 +1811,8 @@
 def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
 def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
 def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
 const01	8
 param01	8
 const02	8.0

--- 1.32/mysql-test/r/ps_7ndb.result	2005-06-27 15:12:07 +04:00
+++ 1.33/mysql-test/r/ps_7ndb.result	2005-07-14 17:27:42 +04:00
@@ -77,8 +77,8 @@
 def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
 def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
 def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
-def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
-def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
+def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
+def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
 def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
 def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
 c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -1793,17 +1793,17 @@
 def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
 def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
 def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
 def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
 def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
 def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
 def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
 def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
 def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
 def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
 def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1811,8 +1811,8 @@
 def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
 def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
 def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
 const01	8
 param01	8
 const02	8.0

--- 1.68/mysql-test/r/select.result	2005-07-04 04:24:20 +04:00
+++ 1.69/mysql-test/r/select.result	2005-07-14 17:32:59 +04:00
@@ -2711,3 +2711,38 @@
 select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
 x'10' + 0	X'10' + 0	b'10' + 0	B'10' + 0
 16	16	2	2
+CREATE TABLE t1 (
+acct_id int(11) NOT NULL default '0',
+profile_id smallint(6) default NULL,
+UNIQUE KEY t1$acct_id (acct_id),
+KEY t1$profile_id (profile_id)
+);
+INSERT INTO t1 VALUES (132,17),(133,18);
+CREATE TABLE t2 (
+profile_id smallint(6) default NULL,
+queue_id int(11) default NULL,
+seq int(11) default NULL,
+KEY t2$queue_id (queue_id)
+);
+INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
+CREATE TABLE t3 (
+id int(11) NOT NULL default '0',
+qtype int(11) default NULL,
+seq int(11) default NULL,
+warn_lvl int(11) default NULL,
+crit_lvl int(11) default NULL,
+rr1 tinyint(4) NOT NULL default '0',
+rr2 int(11) default NULL,
+default_queue tinyint(4) NOT NULL default '0',
+KEY t3$qtype (qtype),
+KEY t3$id (id)
+);
+INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
+(36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
+SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q 
+WHERE 
+(pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND 
+(pq.queue_id = q.id) AND (q.rr1 <> 1);
+COUNT(*)
+4
+drop table t1,t2,t3;

--- 1.52/mysql-test/t/select.test	2005-07-04 04:24:20 +04:00
+++ 1.53/mysql-test/t/select.test	2005-07-14 17:32:59 +04:00
@@ -2290,3 +2290,43 @@
 #
 
 select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
+# Test for BUG#11700
+CREATE TABLE t1 (
+  acct_id int(11) NOT NULL default '0',
+  profile_id smallint(6) default NULL,
+  UNIQUE KEY t1$acct_id (acct_id),
+  KEY t1$profile_id (profile_id)
+);
+INSERT INTO t1 VALUES (132,17),(133,18);
+
+CREATE TABLE t2 (
+  profile_id smallint(6) default NULL,
+  queue_id int(11) default NULL,
+  seq int(11) default NULL,
+  KEY t2$queue_id (queue_id)
+);
+INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
+
+CREATE TABLE t3 (
+  id int(11) NOT NULL default '0',
+  qtype int(11) default NULL,
+  seq int(11) default NULL,
+  warn_lvl int(11) default NULL,
+  crit_lvl int(11) default NULL,
+  rr1 tinyint(4) NOT NULL default '0',
+  rr2 int(11) default NULL,
+  default_queue tinyint(4) NOT NULL default '0',
+  KEY t3$qtype (qtype),
+  KEY t3$id (id)
+);
+
+INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
+  (36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
+
+SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q 
+WHERE 
+  (pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND 
+  (pq.queue_id = q.id) AND (q.rr1 <> 1);
+
+drop table t1,t2,t3;
+

--- 1.135/tests/mysql_client_test.c	2005-07-14 15:27:15 +04:00
+++ 1.136/tests/mysql_client_test.c	2005-07-14 17:32:59 +04:00
@@ -698,7 +698,7 @@
       fprintf(stdout, "\n    org_table:`%s`\t(expected: `%s`)",
               field->org_table, org_table);
     fprintf(stdout, "\n    database :`%s`\t(expected: `%s`)", field->db, db);
-    fprintf(stdout, "\n    length   :`%ld`\t(expected: `%ld`)",
+    fprintf(stdout, "\n    length   :`%lu`\t(expected: `%lu`)",
             field->length, length * cs->mbmaxlen);
     fprintf(stdout, "\n    maxlength:`%ld`", field->max_length);
     fprintf(stdout, "\n    charsetnr:`%d`", field->charsetnr);
@@ -13634,6 +13634,31 @@
   myquery(rc);
 }
 
+/* Test correct max length for MEDIUMTEXT and LONGTEXT columns */
+
+static void test_bug9735()
+{
+  MYSQL_RES *res;
+  int rc;
+
+  myheader("test_bug9735");
+
+  rc= mysql_query(mysql, "drop table if exists t1");
+  myquery(rc);
+  rc= mysql_query(mysql, "create table t1 (a mediumtext, b longtext) "
+                         "character set latin1");
+  myquery(rc);
+  rc= mysql_query(mysql, "select * from t1");
+  myquery(rc);
+  res= mysql_store_result(mysql);
+  verify_prepare_field(res, 0, "a", "a", MYSQL_TYPE_BLOB,
+                       "t1", "t1", current_db, (1U << 24)-1, 0);
+  verify_prepare_field(res, 1, "b", "b", MYSQL_TYPE_BLOB,
+                       "t1", "t1", current_db, ~0U, 0);
+  mysql_free_result(res);
+  rc= mysql_query(mysql, "drop table t1");
+  myquery(rc);
+}
 
 /*
   Read and parse arguments and MySQL options from my.cnf
@@ -13876,6 +13901,7 @@
   { "test_bug11172", test_bug11172 },
   { "test_bug11656", test_bug11656 },
   { "test_bug10214", test_bug10214 },
+  { "test_bug9735", test_bug9735 },
   { 0, 0 }
 };
 
Thread
bk commit into 5.0 tree (konstantin:1.1931)konstantin14 Jul