dbTalk Databases Forums  

bk commit into 5.0 tree (jimw:1.1869)

mailing.database.mysql-internals mailing.database.mysql-internals


Discuss bk commit into 5.0 tree (jimw:1.1869) in the mailing.database.mysql-internals forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim Winstead
 
Posts: n/a

Default bk commit into 5.0 tree (jimw:1.1869) - 04-05-2005 , 01:02 AM






Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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/in...urce-tree.html

ChangeSet
1.1869 05/04/04 23:03:56 jimw (AT) mysql (DOT) com +8 -0
Merge

sql/item_sum.cc
1.137 05/04/04 23:03:53 jimw (AT) mysql (DOT) com +1 -1
Merge

mysql-test/t/kill.test
1.11 05/04/04 23:02:36 jimw (AT) mysql (DOT) com +0 -3
Merge

mysql-test/r/kill.result
1.6 05/04/04 23:02:16 jimw (AT) mysql (DOT) com +0 -6
Merge

client/mysqltest.c
1.137 05/04/04 23:01:48 jimw (AT) mysql (DOT) com +2 -2
Merge

sql/mysqld.cc
1.448 05/04/04 23:00:49 jimw (AT) mysql (DOT) com +0 -0
Auto merged

sql-common/client.c
1.70 05/04/04 23:00:49 jimw (AT) mysql (DOT) com +0 -0
Auto merged

mysql-test/t/join_outer.test
1.26 05/04/04 23:00:48 jimw (AT) mysql (DOT) com +10 -11
Auto merged

mysql-test/r/join_outer.result
1.37 05/04/04 23:00:48 jimw (AT) mysql (DOT) com +19 -19
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: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-5.0-clean/RESYNC

--- 1.136/sql/item_sum.cc 2005-04-01 04:04:44 -08:00
+++ 1.137/sql/item_sum.cc 2005-04-04 23:03:53 -07:00
@@ -2802,9 +2802,20 @@

void Item_func_group_concat::cleanup()
{
+ THD *thd= current_thd;
+
DBUG_ENTER("Item_func_group_concat::cleanup");
Item_sum::cleanup();

+ /* Adjust warning message to include total number of cut values */
+ if (warning)
+ {
+ char warn_buff[MYSQL_ERRMSG_SIZE];
+ sprintf(warn_buff, ER(ER_CUT_VALUE_GROUP_CONCAT), count_cut_values);
+ warning->set_msg(thd, warn_buff);
+ warning= 0;
+ }
+
/*
Free table and tree if they belong to this item (if item have not pointer
to original item from which was made copy => it own its objects )
@@ -3059,6 +3070,10 @@
return 0;
if (count_cut_values && !warning)
{
+ /*
+ ER_CUT_VALUE_GROUP_CONCAT needs an argument, but this gets set in
+ Item_func_group_concat::cleanup().
+ */
DBUG_ASSERT(table);
warning= push_warning(table->in_use, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_CUT_VALUE_GROUP_CONCAT,

--- 1.447/sql/mysqld.cc 2005-04-01 04:04:44 -08:00
+++ 1.448/sql/mysqld.cc 2005-04-04 23:00:49 -07:00
@@ -6116,16 +6116,6 @@
sf_malloc_mem_limit = atoi(argument);
#endif
break;
-#ifdef EMBEDDED_LIBRARY
- case OPT_MAX_ALLOWED_PACKET:
- max_allowed_packet= atoi(argument);
- global_system_variables.max_allowed_packet= max_allowed_packet;
- break;
- case OPT_NET_BUFFER_LENGTH:
- net_buffer_length= atoi(argument);
- global_system_variables.net_buffer_length= net_buffer_length;
- break;
-#endif
#include <sslopt-case.h>
case 'V':
print_version();
@@ -6713,6 +6703,9 @@
#ifndef EMBEDDED_LIBRARY
if (mysqld_chroot)
set_root(mysqld_chroot);
+#else
+ max_allowed_packet= global_system_variables.max_allowed_packet;
+ net_buffer_length= global_system_variables.net_buffer_length;
#endif
fix_paths();


--- 1.69/sql-common/client.c 2005-03-25 14:44:49 -08:00
+++ 1.70/sql-common/client.c 2005-04-04 23:00:49 -07:00
@@ -2211,6 +2211,29 @@
}
tmp_mysql.reconnect= 1;
tmp_mysql.free_me= mysql->free_me;
+
+ /*
+ For each stmt in mysql->stmts, move it to tmp_mysql if it is
+ in state MYSQL_STMT_INIT_DONE, otherwise close it.
+ */
+ {
+ LIST *element= mysql->stmts;
+ for (; element; element= element->next)
+ {
+ MYSQL_STMT *stmt= (MYSQL_STMT *) element->data;
+ if (stmt->state != MYSQL_STMT_INIT_DONE)
+ {
+ stmt->mysql= 0;
+ }
+ else
+ {
+ tmp_mysql.stmts= list_add(tmp_mysql.stmts, &stmt->list);
+ }
+ /* No need to call list_delete for statement here */
+ }
+ mysql->stmts= NULL;
+ }
+
/* Don't free options as these are now used in tmp_mysql */
bzero((char*) &mysql->options,sizeof(mysql->options));
mysql->free_me=0;
@@ -2299,6 +2322,10 @@
SYNOPSYS
mysql_detach_stmt_list()
stmt_list pointer to mysql->stmts
+
+ NOTE
+ There is similar code in mysql_reconnect(), so changes here
+ should also be reflected there.
*/

void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)))

--- 1.36/mysql-test/r/join_outer.result 2005-04-01 01:10:44 -08:00
+++ 1.37/mysql-test/r/join_outer.result 2005-04-04 23:00:48 -07:00
@@ -924,3 +924,22 @@
3 1 NULL NULL
4 2 NULL NULL
DROP TABLE t1,t2;
+set group_concat_max_len=5;
+create table t1 (a int, b varchar(20));
+create table t2 (a int, c varchar(20));
+insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
+insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
+select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
+group_concat(t1.b,t2.c)
+aaaaa
+bbbbb
+Warnings:
+Warning 1260 2 line(s) were cut by GROUP_CONCAT()
+select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
+group_concat(t1.b,t2.c)
+aaaaa
+bbbbb
+Warnings:
+Warning 1260 2 line(s) were cut by GROUP_CONCAT()
+drop table t1, t2;
+set group_concat_max_len=default;

--- 1.25/mysql-test/t/join_outer.test 2005-04-01 01:10:44 -08:00
+++ 1.26/mysql-test/t/join_outer.test 2005-04-04 23:00:48 -07:00
@@ -651,4 +651,13 @@

DROP TABLE t1,t2;

-
+# Bug #8681: Bad warning message when group_concat() exceeds max length
+set group_concat_max_len=5;
+create table t1 (a int, b varchar(20));
+create table t2 (a int, c varchar(20));
+insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
+insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
+select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
+select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
+drop table t1, t2;
+set group_concat_max_len=default;

--- 1.136/client/mysqltest.c 2005-03-28 13:00:34 -08:00
+++ 1.137/client/mysqltest.c 2005-04-04 23:01:48 -07:00
@@ -294,6 +294,7 @@
Q_START_TIMER, Q_END_TIMER,
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
Q_EXIT,
+Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT,

Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
@@ -382,6 +383,8 @@
"disable_ps_protocol",
"enable_ps_protocol",
"exit",
+ "disable_reconnect",
+ "enable_reconnect",
0
};

@@ -3894,6 +3897,12 @@
break;
case Q_ENABLE_PS_PROTOCOL:
ps_protocol_enabled= ps_protocol;
+ break;
+ case Q_DISABLE_RECONNECT:
+ cur_con->mysql.reconnect= 0;
+ break;
+ case Q_ENABLE_RECONNECT:
+ cur_con->mysql.reconnect= 1;
break;

case Q_EXIT:

--- 1.5/mysql-test/r/kill.result 2005-03-18 16:17:06 -08:00
+++ 1.6/mysql-test/r/kill.result 2005-04-04 23:02:16 -07:00
@@ -5,6 +5,8 @@
((@id := kill_id) - kill_id)
0
kill @id;
+select 1;
+ERROR HY000: MySQL server has gone away
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0

--- 1.10/mysql-test/t/kill.test 2005-03-18 16:17:06 -08:00
+++ 1.11/mysql-test/t/kill.test 2005-04-04 23:02:36 -07:00
@@ -23,13 +23,15 @@
select ((@id := kill_id) - kill_id) from t1;
kill @id;

-# Wait for thread to do.
---sleep 5
-# verify that con1 is doning a reconnect
connection con1;
---ping
---ping
-select ((@id := kill_id) - kill_id) from t1;
+
+--disable_reconnect
+# this statement should fail
+--error 2006
+select 1;
+--enable_reconnect
+# this should work, and we should have a new connection_id()
+select ((@id := kill_id) - kill_id) from t1;
select @id != connection_id();

#make sure the server is still alive

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.