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
23c604d9
Commit
23c604d9
authored
Jul 15, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.1
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
44dd2bca
ac3e1a93
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
client/mysqltest.c
client/mysqltest.c
+2
-2
mysql-test/r/timezone_grant.result
mysql-test/r/timezone_grant.result
+7
-0
mysql-test/t/timezone_grant.test
mysql-test/t/timezone_grant.test
+12
-0
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
No files found.
client/mysqltest.c
View file @
23c604d9
...
@@ -3141,10 +3141,10 @@ static void run_query_display_metadata(MYSQL_FIELD *field, uint num_fields,
...
@@ -3141,10 +3141,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
)
?
...
...
mysql-test/r/timezone_grant.result
View file @
23c604d9
...
@@ -45,6 +45,13 @@ select * from mysql.time_zone_name;
...
@@ -45,6 +45,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/timezone_grant.test
View file @
23c604d9
...
@@ -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/sql_parse.cc
View file @
23c604d9
...
@@ -1940,7 +1940,8 @@ mysql_execute_command(THD *thd)
...
@@ -1940,7 +1940,8 @@ mysql_execute_command(THD *thd)
that is not a SHOW command or a select that only access local
that is not a SHOW command or a select that only access local
variables, but for now this is probably good enough.
variables, but for now this is probably good enough.
*/
*/
if
(
tables
||
&
lex
->
select_lex
!=
lex
->
all_selects_list
)
if
(
tables
||
&
lex
->
select_lex
!=
lex
->
all_selects_list
||
lex
->
time_zone_tables_used
)
mysql_reset_errors
(
thd
);
mysql_reset_errors
(
thd
);
/*
/*
...
@@ -5413,7 +5414,7 @@ int multi_update_precheck(THD *thd, TABLE_LIST *tables)
...
@@ -5413,7 +5414,7 @@ int 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
)
for
(
table
=
tables
;
table
;
table
=
table
->
next
)
...
...
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