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
d3031366
Commit
d3031366
authored
Mar 22, 2004
by
paul@ice.snake.net
Browse files
Options
Browse Files
Download
Plain Diff
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into ice.snake.net:/Volumes/ice2/MySQL/bk/mysql-4.1
parents
7b45773f
6158c94b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
16 deletions
+34
-16
mysql-test/r/lowercase_table.result
mysql-test/r/lowercase_table.result
+10
-1
mysql-test/t/lowercase_table.test
mysql-test/t/lowercase_table.test
+14
-1
sql/item.cc
sql/item.cc
+2
-3
sql/set_var.h
sql/set_var.h
+1
-1
sql/sql_cache.cc
sql/sql_cache.cc
+1
-6
sql/sql_db.cc
sql/sql_db.cc
+2
-1
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
sql/sql_select.cc
sql/sql_select.cc
+1
-1
strings/uca-dump.c
strings/uca-dump.c
+0
-0
No files found.
mysql-test/r/lowercase_table.result
View file @
d3031366
drop table if exists t1,t2,t3,t4
,T1
;
drop table if exists t1,t2,t3,t4;
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
create table t4 (id int primary key, Word varchar(40) not null);
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
...
...
@@ -49,3 +49,12 @@ delete P1.*,p2.* from t1 as P1, t2 as P2 where P1.a=p2.a;
update t1 as p1, t2 as p2 SET p1.a=1,P2.a=1 where p1.a=P2.a;
update t1 as P1, t2 as P2 SET P1.a=1,p2.a=1 where P1.a=p2.a;
drop table t1,t2;
create table t1 (a int);
create table t2 (a int);
select * from t1 c, t2 C;
ERROR 42000: Not unique table/alias: 'C'
select C.a, c.a from t1 c, t2 C;
ERROR 42000: Not unique table/alias: 'C'
drop table t1, t2;
show tables;
Tables_in_test
mysql-test/t/lowercase_table.test
View file @
d3031366
...
...
@@ -3,7 +3,7 @@
#
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
T1
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
--
enable_warnings
create
table
T1
(
id
int
primary
key
,
Word
varchar
(
40
)
not
null
,
Index
(
Word
));
...
...
@@ -41,3 +41,16 @@ delete P1.*,p2.* from t1 as P1, t2 as P2 where P1.a=p2.a;
update
t1
as
p1
,
t2
as
p2
SET
p1
.
a
=
1
,
P2
.
a
=
1
where
p1
.
a
=
P2
.
a
;
update
t1
as
P1
,
t2
as
P2
SET
P1
.
a
=
1
,
p2
.
a
=
1
where
P1
.
a
=
p2
.
a
;
drop
table
t1
,
t2
;
#
# aliases case insensitive
#
create
table
t1
(
a
int
);
create
table
t2
(
a
int
);
--
error
1066
select
*
from
t1
c
,
t2
C
;
--
error
1066
select
C
.
a
,
c
.
a
from
t1
c
,
t2
C
;
drop
table
t1
,
t2
;
show
tables
;
sql/item.cc
View file @
d3031366
...
...
@@ -456,9 +456,8 @@ bool Item_field::eq(const Item *item, bool binary_cmp) const
(
!
my_strcasecmp
(
table_alias_charset
,
item_field
->
table_name
,
table_name
)
&&
(
!
item_field
->
db_name
||
(
item_field
->
db_name
&&
!
my_strcasecmp
(
table_alias_charset
,
item_field
->
db_name
,
db_name
))))));
(
item_field
->
db_name
&&
!
strcmp
(
item_field
->
db_name
,
db_name
))))));
}
...
...
sql/set_var.h
View file @
d3031366
...
...
@@ -141,7 +141,7 @@ public:
sys_update_func
update_func_arg
,
sys_set_default_func
set_default_func_arg
,
char
*
value_arg
)
:
sys_var
(
name_arg
),
check_func
(
check_func_arg
),
value
(
value
_arg
),
:
sys_var
(
name_arg
),
value
(
value_arg
),
check_func
(
check_func
_arg
),
update_func
(
update_func_arg
),
set_default_func
(
set_default_func_arg
)
{}
bool
check
(
THD
*
thd
,
set_var
*
var
);
...
...
sql/sql_cache.cc
View file @
d3031366
...
...
@@ -1259,12 +1259,7 @@ void Query_cache::invalidate(char *db)
do
{
next
=
curr
->
next
;
/*
table_alias_charset used here because it depends of
lower_case_table_names variable
*/
if
(
my_strcasecmp
(
table_alias_charset
,
db
,
(
char
*
)(
curr
->
table
()
->
db
()))
==
0
)
if
(
strcmp
(
db
,
(
char
*
)(
curr
->
table
()
->
db
()))
==
0
)
invalidate_table
(
curr
);
/*
invalidate_table can freed block on which point 'next' (if
...
...
sql/sql_db.cc
View file @
d3031366
...
...
@@ -504,7 +504,8 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
found_other_files
++
;
continue
;
}
if
(
db
&&
!
my_strcasecmp
(
&
my_charset_latin1
,
// just for safety we use files_charset_info
if
(
db
&&
!
my_strcasecmp
(
files_charset_info
,
extension
,
reg_ext
))
{
/* Drop the table nicely */
...
...
sql/sql_parse.cc
View file @
d3031366
...
...
@@ -2712,7 +2712,7 @@ mysql_execute_command(THD *thd)
for
(
walk
=
(
TABLE_LIST
*
)
tables
;
walk
;
walk
=
walk
->
next
)
{
if
(
!
my_strcasecmp
(
table_alias_charset
,
auxi
->
alias
,
walk
->
alias
)
&&
!
my_strcasecmp
(
table_alias_charset
,
walk
->
db
,
auxi
->
db
))
!
strcmp
(
walk
->
db
,
auxi
->
db
))
break
;
}
if
(
!
walk
)
...
...
@@ -4495,7 +4495,8 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
tables
;
tables
=
tables
->
next
)
{
if
(
!
strcmp
(
alias_str
,
tables
->
alias
)
&&
!
strcmp
(
ptr
->
db
,
tables
->
db
))
if
(
!
my_strcasecmp
(
table_alias_charset
,
alias_str
,
tables
->
alias
)
&&
!
strcmp
(
ptr
->
db
,
tables
->
db
))
{
net_printf
(
thd
,
ER_NONUNIQ_TABLE
,
alias_str
);
/* purecov: tested */
DBUG_RETURN
(
0
);
/* purecov: tested */
...
...
sql/sql_select.cc
View file @
d3031366
...
...
@@ -9376,7 +9376,7 @@ void st_select_lex::print(THD *thd, String *str)
str
->
append
(
table
->
db
);
str
->
append
(
'.'
);
str
->
append
(
table
->
real_name
);
if
(
strcmp
(
table
->
real_name
,
table
->
alias
))
if
(
my_strcasecmp
(
table_alias_charset
,
table
->
real_name
,
table
->
alias
))
{
str
->
append
(
' '
);
str
->
append
(
table
->
alias
);
...
...
mysy
s/uca-dump.c
→
string
s/uca-dump.c
View file @
d3031366
File moved
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