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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
52b8928b
Commit
52b8928b
authored
Jul 19, 2005
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/kostja/mysql/mysql-4.1-root
into mysql.com:/home/kostja/mysql/mysql-5.0-merge
parents
8e60817d
8b3d3916
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
121 additions
and
19 deletions
+121
-19
client/mysqltest.c
client/mysqltest.c
+2
-2
cmd-line-utils/libedit/read.c
cmd-line-utils/libedit/read.c
+1
-1
configure.in
configure.in
+1
-1
mysql-test/r/olap.result
mysql-test/r/olap.result
+11
-0
mysql-test/r/rpl_log.result
mysql-test/r/rpl_log.result
+2
-2
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+5
-5
mysql-test/r/select.result
mysql-test/r/select.result
+28
-0
mysql-test/r/timezone_grant.result
mysql-test/r/timezone_grant.result
+7
-0
mysql-test/t/olap.test
mysql-test/t/olap.test
+9
-0
mysql-test/t/select.test
mysql-test/t/select.test
+28
-0
mysql-test/t/timezone_grant.test
mysql-test/t/timezone_grant.test
+12
-0
sql/mysqld.cc
sql/mysqld.cc
+7
-1
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
sql/sql_repl.cc
sql/sql_repl.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+3
-3
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
client/mysqltest.c
View file @
52b8928b
...
@@ -3393,10 +3393,10 @@ static void run_query_display_metadata(MYSQL_FIELD *field, uint num_fields,
...
@@ -3393,10 +3393,10 @@ static void run_query_display_metadata(MYSQL_FIELD *field, uint num_fields,
int10_to_str
((
int
)
field
->
type
,
buff
,
10
);
int10_to_str
((
int
)
field
->
type
,
buff
,
10
);
dynstr_append
(
ds
,
buff
);
dynstr_append
(
ds
,
buff
);
dynstr_append_mem
(
ds
,
"
\t
"
,
1
);
dynstr_append_mem
(
ds
,
"
\t
"
,
1
);
int10_to_str
((
int
)
field
->
length
,
buff
,
10
);
longlong10_to_str
((
unsigned
int
)
field
->
length
,
buff
,
10
);
dynstr_append
(
ds
,
buff
);
dynstr_append
(
ds
,
buff
);
dynstr_append_mem
(
ds
,
"
\t
"
,
1
);
dynstr_append_mem
(
ds
,
"
\t
"
,
1
);
int10_to_str
((
int
)
field
->
max_length
,
buff
,
10
);
longlong10_to_str
((
unsigned
int
)
field
->
max_length
,
buff
,
10
);
dynstr_append
(
ds
,
buff
);
dynstr_append
(
ds
,
buff
);
dynstr_append_mem
(
ds
,
"
\t
"
,
1
);
dynstr_append_mem
(
ds
,
"
\t
"
,
1
);
dynstr_append_mem
(
ds
,
(
char
*
)
(
IS_NOT_NULL
(
field
->
flags
)
?
dynstr_append_mem
(
ds
,
(
char
*
)
(
IS_NOT_NULL
(
field
->
flags
)
?
...
...
cmd-line-utils/libedit/read.c
View file @
52b8928b
...
@@ -478,7 +478,7 @@ el_gets(EditLine *el, int *nread)
...
@@ -478,7 +478,7 @@ el_gets(EditLine *el, int *nread)
#endif
/* DEBUG_READ */
#endif
/* DEBUG_READ */
break
;
break
;
}
}
if
((
uint
)
cmdnum
>=
el
->
el_map
.
nfunc
)
{
/* BUG CHECK command */
if
((
u
nsigned
int
)
cmdnum
>=
el
->
el_map
.
nfunc
)
{
/* BUG CHECK command */
#ifdef DEBUG_EDIT
#ifdef DEBUG_EDIT
(
void
)
fprintf
(
el
->
el_errfile
,
(
void
)
fprintf
(
el
->
el_errfile
,
"ERROR: illegal command from key 0%o
\r\n
"
,
ch
);
"ERROR: illegal command from key 0%o
\r\n
"
,
ch
);
...
...
configure.in
View file @
52b8928b
dnl -
*
- ksh -
*
-
dnl -
*
- ksh -
*
-
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ
(
2.5
8
)
dnl Minimum Autoconf version required.
AC_PREREQ
(
2.5
7
)
dnl Minimum Autoconf version required.
AC_INIT
(
sql/mysqld.cc
)
AC_INIT
(
sql/mysqld.cc
)
AC_CANONICAL_SYSTEM
AC_CANONICAL_SYSTEM
...
...
mysql-test/r/olap.result
View file @
52b8928b
...
@@ -576,4 +576,15 @@ EXPLAIN SELECT type FROM v1 GROUP BY type WITH ROLLUP;
...
@@ -576,4 +576,15 @@ EXPLAIN SELECT type FROM v1 GROUP BY type WITH ROLLUP;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using filesort
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using filesort
DROP VIEW v1;
DROP VIEW v1;
CREATE TABLE t1 (a INT(10) NOT NULL, b INT(10) NOT NULL);
INSERT INTO t1 VALUES (1, 1);
INSERT INTO t1 VALUES (1, 2);
SELECT a, b, a AS c, COUNT(*) AS count FROM t1 GROUP BY a, b, c WITH ROLLUP;
a b c count
1 1 1 1
1 1 NULL 1
1 2 1 1
1 2 NULL 1
1 NULL NULL 2
NULL NULL NULL 2
DROP TABLE t1;
DROP TABLE t1;
mysql-test/r/rpl_log.result
View file @
52b8928b
...
@@ -69,12 +69,12 @@ master-bin.000002 346 Query 1 434 use `test`; insert into t1 values (1)
...
@@ -69,12 +69,12 @@ master-bin.000002 346 Query 1 434 use `test`; insert into t1 values (1)
master-bin.000002 434 Query 1 510 use `test`; drop table t1
master-bin.000002 434 Query 1 510 use `test`; drop table t1
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
master-bin.000001
0
master-bin.000001
1171
master-bin.000002 510
master-bin.000002 510
start slave;
start slave;
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
slave-bin.000001
0
slave-bin.000001
1285
slave-bin.000002 348
slave-bin.000002 348
show binlog events in 'slave-bin.000001' from 4;
show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
...
...
mysql-test/r/rpl_rotate_logs.result
View file @
52b8928b
...
@@ -27,8 +27,8 @@ insert into t2 values (34),(67),(123);
...
@@ -27,8 +27,8 @@ insert into t2 values (34),(67),(123);
flush logs;
flush logs;
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
master-bin.000001
0
master-bin.000001
461
master-bin.000002
0
master-bin.000002
213
master-bin.000003 98
master-bin.000003 98
create table t3 select * from temp_table;
create table t3 select * from temp_table;
select * from t3;
select * from t3;
...
@@ -43,12 +43,12 @@ start slave;
...
@@ -43,12 +43,12 @@ start slave;
purge master logs to 'master-bin.000002';
purge master logs to 'master-bin.000002';
show master logs;
show master logs;
Log_name File_size
Log_name File_size
master-bin.000002
0
master-bin.000002
213
master-bin.000003 407
master-bin.000003 407
purge binary logs to 'master-bin.000002';
purge binary logs to 'master-bin.000002';
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
master-bin.000002
0
master-bin.000002
213
master-bin.000003 407
master-bin.000003 407
purge master logs before now();
purge master logs before now();
show binary logs;
show binary logs;
...
@@ -74,7 +74,7 @@ count(*)
...
@@ -74,7 +74,7 @@ count(*)
create table t4 select * from temp_table;
create table t4 select * from temp_table;
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
master-bin.000003
0
master-bin.000003
4167
master-bin.000004 0
master-bin.000004 0
master-bin.000005 2032
master-bin.000005 2032
show master status;
show master status;
...
...
mysql-test/r/select.result
View file @
52b8928b
...
@@ -2757,3 +2757,31 @@ f2
...
@@ -2757,3 +2757,31 @@ f2
1
1
NULL
NULL
drop table t1,t2;
drop table t1,t2;
create table t2 (a tinyint unsigned);
create index t2i on t2(a);
insert into t2 values (0), (254), (255);
explain select * from t2 where a > -1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2i t2i 2 NULL 3 Using where; Using index
select * from t2 where a > -1;
a
0
254
255
drop table t2;
CREATE TABLE t1 (a int, b int, c int);
INSERT INTO t1
SELECT 50, 3, 3 FROM DUAL
WHERE NOT EXISTS
(SELECT * FROM t1 WHERE a = 50 AND b = 3);
SELECT * FROM t1;
a b c
50 3 3
INSERT INTO t1
SELECT 50, 3, 3 FROM DUAL
WHERE NOT EXISTS
(SELECT * FROM t1 WHERE a = 50 AND b = 3);
SELECT * FROM t1;
a b c
50 3 3
DROP TABLE t1;
mysql-test/r/timezone_grant.result
View file @
52b8928b
...
@@ -47,6 +47,13 @@ select * from mysql.time_zone_name;
...
@@ -47,6 +47,13 @@ select * from mysql.time_zone_name;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name;
select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
drop table t1, t2;
create table t1 (a int, b datetime);
create table t2 (a int, b varchar(40));
update t1 set b = '2005-01-01 10:00';
update t1 set b = convert_tz(b, 'UTC', 'UTC');
update t1 join t2 on (t1.a = t2.a) set t1.b = '2005-01-01 10:00' where t2.b = 'foo';
update t1 join t2 on (t1.a = t2.a) set t1.b = convert_tz('2005-01-01 10:00','UTC','UTC') where t2.b = 'foo';
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
...
...
mysql-test/t/olap.test
View file @
52b8928b
...
@@ -265,4 +265,13 @@ SELECT type FROM v1 GROUP BY type WITH ROLLUP;
...
@@ -265,4 +265,13 @@ SELECT type FROM v1 GROUP BY type WITH ROLLUP;
EXPLAIN
SELECT
type
FROM
v1
GROUP
BY
type
WITH
ROLLUP
;
EXPLAIN
SELECT
type
FROM
v1
GROUP
BY
type
WITH
ROLLUP
;
DROP
VIEW
v1
;
DROP
VIEW
v1
;
# Test for bug #11543: ROLLUP query with a repeated column in GROUP BY
#
CREATE
TABLE
t1
(
a
INT
(
10
)
NOT
NULL
,
b
INT
(
10
)
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
1
,
1
);
INSERT
INTO
t1
VALUES
(
1
,
2
);
SELECT
a
,
b
,
a
AS
c
,
COUNT
(
*
)
AS
count
FROM
t1
GROUP
BY
a
,
b
,
c
WITH
ROLLUP
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
mysql-test/t/select.test
View file @
52b8928b
...
@@ -2341,3 +2341,31 @@ insert into t2 values (1,2,3),(2,4,6);
...
@@ -2341,3 +2341,31 @@ insert into t2 values (1,2,3),(2,4,6);
select
A
.
f2
from
t1
left
join
t2
A
on
A
.
f2
=
f1
where
A
.
f3
=
(
select
min
(
f3
)
select
A
.
f2
from
t1
left
join
t2
A
on
A
.
f2
=
f1
where
A
.
f3
=
(
select
min
(
f3
)
from
t2
C
where
A
.
f4
=
C
.
f4
)
or
A
.
f3
IS
NULL
;
from
t2
C
where
A
.
f4
=
C
.
f4
)
or
A
.
f3
IS
NULL
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# Bug #11521 Negative integer keys incorrectly substituted for 0 during
# range analysis.
create
table
t2
(
a
tinyint
unsigned
);
create
index
t2i
on
t2
(
a
);
insert
into
t2
values
(
0
),
(
254
),
(
255
);
explain
select
*
from
t2
where
a
>
-
1
;
select
*
from
t2
where
a
>
-
1
;
drop
table
t2
;
#
# Bug #11745: SELECT ... FROM DUAL with WHERE condition
#
CREATE
TABLE
t1
(
a
int
,
b
int
,
c
int
);
INSERT
INTO
t1
SELECT
50
,
3
,
3
FROM
DUAL
WHERE
NOT
EXISTS
(
SELECT
*
FROM
t1
WHERE
a
=
50
AND
b
=
3
);
SELECT
*
FROM
t1
;
INSERT
INTO
t1
SELECT
50
,
3
,
3
FROM
DUAL
WHERE
NOT
EXISTS
(
SELECT
*
FROM
t1
WHERE
a
=
50
AND
b
=
3
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
mysql-test/t/timezone_grant.test
View file @
52b8928b
...
@@ -61,6 +61,18 @@ select * from mysql.time_zone_name;
...
@@ -61,6 +61,18 @@ select * from mysql.time_zone_name;
--
error
1142
--
error
1142
select
Name
,
convert_tz
(
'2004-11-30 12:00:00'
,
Name
,
'UTC'
)
from
mysql
.
time_zone_name
;
select
Name
,
convert_tz
(
'2004-11-30 12:00:00'
,
Name
,
'UTC'
)
from
mysql
.
time_zone_name
;
#
# Bug #9979: Use of CONVERT_TZ in multiple-table UPDATE causes bogus
# privilege error
#
drop
table
t1
,
t2
;
create
table
t1
(
a
int
,
b
datetime
);
create
table
t2
(
a
int
,
b
varchar
(
40
));
update
t1
set
b
=
'2005-01-01 10:00'
;
update
t1
set
b
=
convert_tz
(
b
,
'UTC'
,
'UTC'
);
update
t1
join
t2
on
(
t1
.
a
=
t2
.
a
)
set
t1
.
b
=
'2005-01-01 10:00'
where
t2
.
b
=
'foo'
;
update
t1
join
t2
on
(
t1
.
a
=
t2
.
a
)
set
t1
.
b
=
convert_tz
(
'2005-01-01 10:00'
,
'UTC'
,
'UTC'
)
where
t2
.
b
=
'foo'
;
# Clean-up
# Clean-up
connection
default
;
connection
default
;
delete
from
mysql
.
user
where
user
like
'mysqltest\_%'
;
delete
from
mysql
.
user
where
user
like
'mysqltest\_%'
;
...
...
sql/mysqld.cc
View file @
52b8928b
...
@@ -685,7 +685,13 @@ static void close_connections(void)
...
@@ -685,7 +685,13 @@ static void close_connections(void)
{
{
DBUG_PRINT
(
"quit"
,(
"Informing thread %ld that it's time to die"
,
DBUG_PRINT
(
"quit"
,(
"Informing thread %ld that it's time to die"
,
tmp
->
thread_id
));
tmp
->
thread_id
));
tmp
->
killed
=
THD
::
KILL_CONNECTION
;
/*
Re: bug 7403 - close_connection will be called mulitple times
a wholesale clean up of our network code is a very large project.
This will wake up the socket on Windows and prevent the printing of
the error message that we are force closing a connection.
*/
close_connection
(
tmp
,
0
,
0
);
if
(
tmp
->
mysys_var
)
if
(
tmp
->
mysys_var
)
{
{
tmp
->
mysys_var
->
abort
=
1
;
tmp
->
mysys_var
->
abort
=
1
;
...
...
sql/sql_parse.cc
View file @
52b8928b
...
@@ -2304,7 +2304,8 @@ mysql_execute_command(THD *thd)
...
@@ -2304,7 +2304,8 @@ mysql_execute_command(THD *thd)
Don't reset warnings when executing a stored routine.
Don't reset warnings when executing a stored routine.
*/
*/
if
((
all_tables
||
&
lex
->
select_lex
!=
lex
->
all_selects_list
||
if
((
all_tables
||
&
lex
->
select_lex
!=
lex
->
all_selects_list
||
lex
->
sroutines
.
records
)
&&
!
thd
->
spcont
)
lex
->
sroutines
.
records
)
&&
!
thd
->
spcont
||
lex
->
time_zone_tables_used
)
mysql_reset_errors
(
thd
,
0
);
mysql_reset_errors
(
thd
,
0
);
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
...
@@ -6843,7 +6844,7 @@ bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
...
@@ -6843,7 +6844,7 @@ bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
/*
/*
Is there tables of subqueries?
Is there tables of subqueries?
*/
*/
if
(
&
lex
->
select_lex
!=
lex
->
all_selects_list
)
if
(
&
lex
->
select_lex
!=
lex
->
all_selects_list
||
lex
->
time_zone_tables_used
)
{
{
DBUG_PRINT
(
"info"
,(
"Checking sub query list"
));
DBUG_PRINT
(
"info"
,(
"Checking sub query list"
));
for
(
table
=
tables
;
table
;
table
=
table
->
next_global
)
for
(
table
=
tables
;
table
;
table
=
table
->
next_global
)
...
...
sql/sql_repl.cc
View file @
52b8928b
...
@@ -1526,7 +1526,7 @@ bool show_binlogs(THD* thd)
...
@@ -1526,7 +1526,7 @@ bool show_binlogs(THD* thd)
else
else
{
{
/* this is an old log, open it and find the size */
/* this is an old log, open it and find the size */
if
((
file
=
my_open
(
fname
+
dir_len
,
O_RDONLY
|
O_SHARE
|
O_BINARY
,
if
((
file
=
my_open
(
fname
,
O_RDONLY
|
O_SHARE
|
O_BINARY
,
MYF
(
0
)))
>=
0
)
MYF
(
0
)))
>=
0
)
{
{
file_length
=
(
ulonglong
)
my_seek
(
file
,
0L
,
MY_SEEK_END
,
MYF
(
0
));
file_length
=
(
ulonglong
)
my_seek
(
file
,
0L
,
MY_SEEK_END
,
MYF
(
0
));
...
...
sql/sql_select.cc
View file @
52b8928b
...
@@ -1198,7 +1198,7 @@ JOIN::exec()
...
@@ -1198,7 +1198,7 @@ JOIN::exec()
{
{
result
->
send_fields
(
fields_list
,
result
->
send_fields
(
fields_list
,
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
);
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
);
if
(
!
having
||
having
->
val_int
(
))
if
(
cond_value
!=
Item
::
COND_FALSE
&&
(
!
having
||
having
->
val_int
()
))
{
{
if
(
do_send_rows
&&
(
procedure
?
(
procedure
->
send_row
(
fields_list
)
||
if
(
do_send_rows
&&
(
procedure
?
(
procedure
->
send_row
(
fields_list
)
||
procedure
->
end_of_records
())
procedure
->
end_of_records
())
...
@@ -13065,7 +13065,7 @@ bool JOIN::rollup_init()
...
@@ -13065,7 +13065,7 @@ bool JOIN::rollup_init()
ORDER
*
group_tmp
;
ORDER
*
group_tmp
;
for
(
group_tmp
=
group_list
;
group_tmp
;
group_tmp
=
group_tmp
->
next
)
for
(
group_tmp
=
group_list
;
group_tmp
;
group_tmp
=
group_tmp
->
next
)
{
{
if
(
item
->
eq
(
*
group_tmp
->
item
,
0
)
)
if
(
*
group_tmp
->
item
==
item
)
item
->
maybe_null
=
1
;
item
->
maybe_null
=
1
;
}
}
if
(
item
->
type
()
==
Item
::
FUNC_ITEM
)
if
(
item
->
type
()
==
Item
::
FUNC_ITEM
)
...
@@ -13185,7 +13185,7 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
...
@@ -13185,7 +13185,7 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
for
(
group_tmp
=
start_group
,
i
=
pos
;
for
(
group_tmp
=
start_group
,
i
=
pos
;
group_tmp
;
group_tmp
=
group_tmp
->
next
,
i
++
)
group_tmp
;
group_tmp
=
group_tmp
->
next
,
i
++
)
{
{
if
(
item
->
eq
(
*
group_tmp
->
item
,
0
)
)
if
(
*
group_tmp
->
item
==
item
)
{
{
/*
/*
This is an element that is used by the GROUP BY and should be
This is an element that is used by the GROUP BY and should be
...
...
sql/sql_yacc.yy
View file @
52b8928b
...
@@ -4026,7 +4026,7 @@ select_into:
...
@@ -4026,7 +4026,7 @@ select_into:
select_from:
select_from:
FROM join_table_list where_clause group_clause having_clause
FROM join_table_list where_clause group_clause having_clause
opt_order_clause opt_limit_clause procedure_clause
opt_order_clause opt_limit_clause procedure_clause
| FROM DUAL_SYM opt_limit_clause
| FROM DUAL_SYM
where_clause
opt_limit_clause
/* oracle compatibility: oracle always requires FROM clause,
/* oracle compatibility: oracle always requires FROM clause,
and DUAL is system table without fields.
and DUAL is system table without fields.
Is "SELECT 1 FROM DUAL" any better than "SELECT 1" ?
Is "SELECT 1 FROM DUAL" any better than "SELECT 1" ?
...
...
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