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
49413542
Commit
49413542
authored
Aug 22, 2005
by
monty@mishka.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
parents
f5f6ed8b
d62295e4
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
377 additions
and
345 deletions
+377
-345
include/my_global.h
include/my_global.h
+7
-7
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+4
-0
mysql-test/r/sp-security.result
mysql-test/r/sp-security.result
+2
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+1
-0
mysql-test/t/sp-security.test
mysql-test/t/sp-security.test
+6
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-1
sql/mysqld.cc
sql/mysqld.cc
+2
-1
sql/sp_head.cc
sql/sp_head.cc
+130
-124
sql/sql_base.cc
sql/sql_base.cc
+5
-10
sql/sql_db.cc
sql/sql_db.cc
+16
-6
sql/sql_lex.cc
sql/sql_lex.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+7
-2
sql/sql_show.cc
sql/sql_show.cc
+188
-183
sql/sql_view.cc
sql/sql_view.cc
+1
-1
sql/table.cc
sql/table.cc
+5
-9
No files found.
include/my_global.h
View file @
49413542
...
...
@@ -933,10 +933,10 @@ typedef char bool; /* Ordinary boolean values 0 1 */
(ABSTIME).ts_nsec=0; \
}
#define set_timespec_nsec(ABSTIME,NSEC) \
{\
ulonglong now= my_getsystime(); \
(ABSTIME).ts_sec=
(now / ULL(10000000)) + (NSEC / ULL(100
0000000)); \
(ABSTIME).ts_nsec= (now % ULL(10000000)
) * 100 + (NSEC % ULL(10000000
00)); \
{
\
ulonglong now= my_getsystime()
+ (NSEC/100)
; \
(ABSTIME).ts_sec=
(now / ULL(1
0000000)); \
(ABSTIME).ts_nsec= (now % ULL(10000000)
* 100 + ((NSEC) % 1
00)); \
}
#else
#define set_timespec(ABSTIME,SEC) \
...
...
@@ -948,9 +948,9 @@ typedef char bool; /* Ordinary boolean values 0 1 */
}
#define set_timespec_nsec(ABSTIME,NSEC) \
{\
ulonglong now= my_getsystime(); \
(ABSTIME).tv_sec=
(now / ULL(10000000)) + (NSEC / ULL(100
0000000)); \
(ABSTIME).tv_nsec= (now % ULL(10000000)
) * 100 + (NSEC % ULL(1000000000));
\
ulonglong now= my_getsystime()
+ (NSEC/100)
; \
(ABSTIME).tv_sec=
(now / ULL(1
0000000)); \
(ABSTIME).tv_nsec= (now % ULL(10000000)
* 100 + ((NSEC) % 100));
\
}
#endif
/* HAVE_TIMESPEC_TS_SEC */
#endif
/* set_timespec */
...
...
mysql-test/r/information_schema.result
View file @
49413542
...
...
@@ -966,4 +966,8 @@ column_name column_default
a NULL
b NULL
use test;
show columns from t1;
Field Type Null Key Default Extra
a int(11) NO
b int(11) YES NULL
drop table t1;
mysql-test/r/sp-security.result
View file @
49413542
...
...
@@ -245,6 +245,8 @@ end//
grant usage on *.* to mysqltest_1@localhost;
call mysqltest_1.p1();
ERROR 42000: execute command denied to user 'mysqltest_1'@'localhost' for routine 'mysqltest_1.p1'
call mysqltest_1.p1();
ERROR 42000: execute command denied to user 'mysqltest_1'@'localhost' for routine 'mysqltest_1.p1'
drop procedure mysqltest_1.p1;
drop database mysqltest_1;
revoke usage on *.* from mysqltest_1@localhost;
...
...
mysql-test/t/information_schema.test
View file @
49413542
...
...
@@ -649,4 +649,5 @@ use information_schema;
select
column_name
,
column_default
from
columns
where
table_schema
=
'test'
and
table_name
=
't1'
;
use
test
;
show
columns
from
t1
;
drop
table
t1
;
mysql-test/t/sp-security.test
View file @
49413542
...
...
@@ -397,6 +397,12 @@ connection n1;
--
error
1370
call
mysqltest_1
.
p1
();
disconnect
n1
;
# Test also without a current database
connect
(
n2
,
localhost
,
mysqltest_1
,,
*
NO
-
ONE
*
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
connection
n2
;
--
error
1370
call
mysqltest_1
.
p1
();
disconnect
n2
;
connection
default
;
...
...
sql/item_cmpfunc.cc
View file @
49413542
...
...
@@ -630,7 +630,7 @@ int Arg_comparator::compare_row()
owner
->
null_value
=
0
;
res
=
0
;
// continue comparison (maybe we will meet explicit difference)
}
if
(
res
)
else
if
(
res
)
return
res
;
}
if
(
was_null
)
...
...
@@ -645,6 +645,7 @@ int Arg_comparator::compare_row()
return
0
;
}
int
Arg_comparator
::
compare_e_row
()
{
(
*
a
)
->
bring_value
();
...
...
sql/mysqld.cc
View file @
49413542
...
...
@@ -730,7 +730,8 @@ static void close_connections(void)
DBUG_PRINT
(
"quit"
,(
"Informing thread %ld that it's time to die"
,
tmp
->
thread_id
));
/* We skip slave threads on this first loop through. */
if
(
tmp
->
slave_thread
)
continue
;
if
(
tmp
->
slave_thread
)
continue
;
tmp
->
killed
=
THD
::
KILL_CONNECTION
;
if
(
tmp
->
mysys_var
)
...
...
sql/sp_head.cc
View file @
49413542
This diff is collapsed.
Click to expand it.
sql/sql_base.cc
View file @
49413542
...
...
@@ -150,14 +150,10 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild)
DBUG_ASSERT
(
share
->
table_name
!=
0
);
if
((
!
share
->
table_name
))
// To be removed
continue
;
// Shouldn't happen
if
(
db
&&
my_strcasecmp
(
system_charset_info
,
db
,
share
->
table_cache_key
))
if
(
db
&&
my_strcasecmp
(
system_charset_info
,
db
,
share
->
db
))
continue
;
if
(
wild
&&
wild_compare
(
share
->
table_name
,
wild
,
0
))
continue
;
if
(
wild
)
{
if
(
wild_compare
(
share
->
table_name
,
wild
,
0
))
continue
;
}
/* Check if user has SELECT privilege for any column in the table */
table_list
.
db
=
(
char
*
)
share
->
db
;
...
...
@@ -3367,7 +3363,7 @@ static bool
set_new_item_local_context
(
THD
*
thd
,
Item_ident
*
item
,
TABLE_LIST
*
table_ref
)
{
Name_resolution_context
*
context
;
if
(
!
(
context
=
new
Name_resolution_context
))
if
(
!
(
context
=
new
(
thd
->
mem_root
)
Name_resolution_context
))
return
TRUE
;
context
->
init
();
context
->
first_name_resolution_table
=
...
...
@@ -3801,7 +3797,6 @@ store_top_level_join_columns(THD *thd, TABLE_LIST *table_ref,
if
(
cur_left_neighbor
&&
cur_table_ref
->
outer_join
&
JOIN_TYPE_RIGHT
)
{
DBUG_ASSERT
(
cur_table_ref
);
/* This can happen only for JOIN ... ON. */
DBUG_ASSERT
(
table_ref
->
nested_join
->
join_list
.
elements
==
2
);
swap_variables
(
TABLE_LIST
*
,
cur_left_neighbor
,
cur_table_ref
);
...
...
@@ -3811,7 +3806,7 @@ store_top_level_join_columns(THD *thd, TABLE_LIST *table_ref,
store_top_level_join_columns
(
thd
,
cur_table_ref
,
cur_left_neighbor
,
cur_right_neighbor
))
DBUG_RETURN
(
TRUE
);
cur_right_neighbor
=
cur_table_ref
;
cur_right_neighbor
=
cur_table_ref
;
}
}
...
...
sql/sql_db.cc
View file @
49413542
...
...
@@ -998,7 +998,7 @@ static long mysql_rm_arc_files(THD *thd, MY_DIR *dirp,
mysql_change_db()
thd Thread handler
name Databasename
no_access_check True
= don't do access check
no_access_check True
don't do access check. In this case name may be ""
DESCRIPTION
Becasue the database name may have been given directly from the
...
...
@@ -1025,14 +1025,22 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
char
*
dbname
=
my_strdup
((
char
*
)
name
,
MYF
(
MY_WME
));
char
path
[
FN_REFLEN
];
HA_CREATE_INFO
create
;
bool
s
chema
_db
=
0
;
bool
s
ystem
_db
=
0
;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
ulong
db_access
;
#endif
DBUG_ENTER
(
"mysql_change_db"
);
DBUG_PRINT
(
"enter"
,(
"name: '%s'"
,
name
));
/* dbname can only be NULL if malloc failed */
if
(
!
dbname
||
!
(
db_length
=
strlen
(
dbname
)))
{
if
(
no_access_check
&&
dbname
)
{
/* Called from SP when orignal database was not set */
system_db
=
1
;
goto
end
;
}
x_free
(
dbname
);
/* purecov: inspected */
my_message
(
ER_NO_DB_ERROR
,
ER
(
ER_NO_DB_ERROR
),
MYF
(
0
));
/* purecov: inspected */
...
...
@@ -1047,7 +1055,7 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
DBUG_PRINT
(
"info"
,(
"Use database: %s"
,
dbname
));
if
(
!
my_strcasecmp
(
system_charset_info
,
dbname
,
information_schema_name
.
str
))
{
s
chema
_db
=
1
;
s
ystem
_db
=
1
;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
db_access
=
SELECT_ACL
;
#endif
...
...
@@ -1055,13 +1063,15 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if
(
!
no_access_check
)
{
if
(
!
no_access_check
)
{
if
(
test_all_bits
(
thd
->
master_access
,
DB_ACLS
))
db_access
=
DB_ACLS
;
else
db_access
=
(
acl_get
(
thd
->
host
,
thd
->
ip
,
thd
->
priv_user
,
dbname
,
0
)
|
thd
->
master_access
);
if
(
!
(
db_access
&
DB_ACLS
)
&&
(
!
grant_option
||
check_grant_db
(
thd
,
dbname
)))
if
(
!
(
db_access
&
DB_ACLS
)
&&
(
!
grant_option
||
check_grant_db
(
thd
,
dbname
)))
{
my_error
(
ER_DBACCESS_DENIED_ERROR
,
MYF
(
0
),
thd
->
priv_user
,
...
...
@@ -1094,7 +1104,7 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
if
(
!
no_access_check
)
thd
->
db_access
=
db_access
;
#endif
if
(
s
chema
_db
)
if
(
s
ystem
_db
)
{
thd
->
db_charset
=
system_charset_info
;
thd
->
variables
.
collation_database
=
system_charset_info
;
...
...
sql/sql_lex.cc
View file @
49413542
...
...
@@ -1520,7 +1520,7 @@ void st_select_lex_unit::print(String *str)
if
(
union_all
)
str
->
append
(
"all "
,
4
);
else
if
(
union_distinct
==
sl
)
union_all
=
true
;
union_all
=
TRUE
;
}
if
(
sl
->
braces
)
str
->
append
(
'('
);
...
...
sql/sql_parse.cc
View file @
49413542
...
...
@@ -238,7 +238,8 @@ static int get_or_create_user_conn(THD *thd, const char *user,
/*
Check if user exist and password supplied is correct.
Check if user exist and password supplied is correct.
SYNOPSIS
check_user()
thd thread handle, thd->{host,user,ip} are used
...
...
@@ -273,6 +274,10 @@ int check_user(THD *thd, enum enum_server_command command,
/* Change database if necessary */
if
(
db
&&
db
[
0
])
{
/*
thd->db is saved in caller and needs to be freed by caller if this
function returns 0
*/
thd
->
db
=
0
;
thd
->
db_length
=
0
;
if
(
mysql_change_db
(
thd
,
db
,
FALSE
))
...
...
@@ -6415,7 +6420,7 @@ Name_resolution_context *
make_join_on_context
(
THD
*
thd
,
TABLE_LIST
*
left_op
,
TABLE_LIST
*
right_op
)
{
Name_resolution_context
*
on_context
;
if
(
!
(
on_context
=
new
Name_resolution_context
))
if
(
!
(
on_context
=
new
(
thd
->
mem_root
)
Name_resolution_context
))
return
NULL
;
on_context
->
init
();
on_context
->
first_name_resolution_table
=
...
...
sql/sql_show.cc
View file @
49413542
This diff is collapsed.
Click to expand it.
sql/sql_view.cc
View file @
49413542
...
...
@@ -310,7 +310,7 @@ bool mysql_create_view(THD *thd,
open_and_lock_tables can change the value of tables,
e.g. it may happen if before the function call tables was equal to 0.
*/
for
(
tbl
=
tables
=
lex
->
query_tables
;
tbl
;
tbl
=
tbl
->
next_global
)
for
(
tbl
=
lex
->
query_tables
;
tbl
;
tbl
=
tbl
->
next_global
)
{
/* is this table temporary and is not view? */
if
(
tbl
->
table
->
s
->
tmp_table
!=
NO_TMP_TABLE
&&
!
tbl
->
view
&&
...
...
sql/table.cc
View file @
49413542
...
...
@@ -2518,12 +2518,9 @@ void Field_iterator_natural_join::set(TABLE_LIST *table_ref)
void
Field_iterator_natural_join
::
next
()
{
cur_column_ref
=
(
*
column_ref_it
)
++
;
DBUG_ASSERT
(
cur_column_ref
?
(
cur_column_ref
->
table_field
?
cur_column_ref
->
table_ref
->
table
==
cur_column_ref
->
table_field
->
table
:
TRUE
)
:
TRUE
);
DBUG_ASSERT
(
!
cur_column_ref
||
!
cur_column_ref
->
table_field
||
cur_column_ref
->
table_ref
->
table
==
cur_column_ref
->
table_field
->
table
);
}
...
...
@@ -2695,9 +2692,8 @@ Field_iterator_table_ref::get_or_create_column_ref(THD *thd, bool *is_created)
nj_col
=
natural_join_it
.
column_ref
();
DBUG_ASSERT
(
nj_col
);
}
DBUG_ASSERT
(
nj_col
->
table_field
?
nj_col
->
table_ref
->
table
==
nj_col
->
table_field
->
table
:
TRUE
);
DBUG_ASSERT
(
!
nj_col
->
table_field
||
nj_col
->
table_ref
->
table
==
nj_col
->
table_field
->
table
);
return
nj_col
;
}
...
...
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