Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bb215f64
Commit
bb215f64
authored
Apr 04, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
81977103
247f2ac5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
17 deletions
+93
-17
client/mysqltest.c
client/mysqltest.c
+9
-0
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+19
-0
mysql-test/r/kill.result
mysql-test/r/kill.result
+2
-0
mysql-test/t/join_outer.test
mysql-test/t/join_outer.test
+10
-1
mysql-test/t/kill.test
mysql-test/t/kill.test
+8
-6
sql-common/client.c
sql-common/client.c
+27
-0
sql/item_sum.cc
sql/item_sum.cc
+15
-0
sql/mysqld.cc
sql/mysqld.cc
+3
-10
No files found.
client/mysqltest.c
View file @
bb215f64
...
...
@@ -294,6 +294,7 @@ Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL,
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 @@ const char *command_names[]=
"disable_ps_protocol"
,
"enable_ps_protocol"
,
"exit"
,
"disable_reconnect"
,
"enable_reconnect"
,
0
};
...
...
@@ -3895,6 +3898,12 @@ int main(int argc, char **argv)
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
:
abort_flag
=
1
;
...
...
mysql-test/r/join_outer.result
View file @
bb215f64
...
...
@@ -924,3 +924,22 @@ a b a b
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;
mysql-test/r/kill.result
View file @
bb215f64
...
...
@@ -5,6 +5,8 @@ select ((@id := kill_id) - kill_id) from t1;
((@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
...
...
mysql-test/t/join_outer.test
View file @
bb215f64
...
...
@@ -651,4 +651,13 @@ SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE not(0+(t1.a=30 and t2.b=1));
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
;
mysql-test/t/kill.test
View file @
bb215f64
...
...
@@ -23,13 +23,15 @@ connection con2;
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
...
...
sql-common/client.c
View file @
bb215f64
...
...
@@ -2211,6 +2211,29 @@ my_bool mysql_reconnect(MYSQL *mysql)
}
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 @@ static void mysql_close_free(MYSQL *mysql)
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
)))
...
...
sql/item_sum.cc
View file @
bb215f64
...
...
@@ -2802,9 +2802,20 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
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 @@ String* Item_func_group_concat::val_str(String* str)
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
,
...
...
sql/mysqld.cc
View file @
bb215f64
...
...
@@ -6116,16 +6116,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
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 @@ static void get_options(int argc,char **argv)
#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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment