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
48a1b10b
Commit
48a1b10b
authored
Sep 07, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ixed table and db name of fields incase of lower_case_table_names (BUG#5154)
parent
c84eeefe
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
3 deletions
+42
-3
mysql-test/r/lowercase_view.result
mysql-test/r/lowercase_view.result
+9
-0
mysql-test/t/lowercase_view-master.opt
mysql-test/t/lowercase_view-master.opt
+1
-0
mysql-test/t/lowercase_view.test
mysql-test/t/lowercase_view.test
+11
-0
sql/item.cc
sql/item.cc
+21
-3
No files found.
mysql-test/r/lowercase_view.result
0 → 100644
View file @
48a1b10b
drop database if exists MySQLTest;
create database MySQLTest;
use MySQLTest;
create table TaB (Field int);
create view ViE as select * from TAb;
show create table VIe;
Table Create Table
vie CREATE VIEW `mysqltest`.`vie` AS select `mysqltest`.`tab`.`Field` AS `Field` from `mysqltest`.`tab`
drop database MySQLTest;
mysql-test/t/lowercase_view-master.opt
0 → 100644
View file @
48a1b10b
--lower_case_table_names=1
mysql-test/t/lowercase_view.test
0 → 100644
View file @
48a1b10b
--
disable_warnings
drop
database
if
exists
MySQLTest
;
--
enable_warnings
create
database
MySQLTest
;
use
MySQLTest
;
create
table
TaB
(
Field
int
);
create
view
ViE
as
select
*
from
TAb
;
show
create
table
VIe
;
drop
database
MySQLTest
;
sql/item.cc
View file @
48a1b10b
...
...
@@ -421,6 +421,24 @@ const char *Item_ident::full_name() const
void
Item_ident
::
print
(
String
*
str
)
{
THD
*
thd
=
current_thd
;
char
d_name_buff
[
MAX_ALIAS_NAME
],
t_name_buff
[
MAX_ALIAS_NAME
];
const
char
*
d_name
=
db_name
,
*
t_name
=
table_name
;
if
(
lower_case_table_names
)
{
if
(
table_name
&&
table_name
[
0
])
{
strmov
(
t_name_buff
,
table_name
);
my_casedn_str
(
files_charset_info
,
t_name_buff
);
t_name
=
t_name_buff
;
}
if
(
db_name
&&
db_name
[
0
])
{
strmov
(
d_name_buff
,
db_name
);
my_casedn_str
(
files_charset_info
,
d_name_buff
);
d_name
=
d_name_buff
;
}
}
if
(
!
table_name
||
!
field_name
)
{
const
char
*
nm
=
field_name
?
field_name
:
name
?
name
:
"tmp_field"
;
...
...
@@ -429,9 +447,9 @@ void Item_ident::print(String *str)
}
if
(
db_name
&&
db_name
[
0
])
{
append_identifier
(
thd
,
str
,
d
b_name
,
strlen
(
db
_name
));
append_identifier
(
thd
,
str
,
d
_name
,
strlen
(
d
_name
));
str
->
append
(
'.'
);
append_identifier
(
thd
,
str
,
t
able_name
,
strlen
(
table
_name
));
append_identifier
(
thd
,
str
,
t
_name
,
strlen
(
t
_name
));
str
->
append
(
'.'
);
append_identifier
(
thd
,
str
,
field_name
,
strlen
(
field_name
));
}
...
...
@@ -439,7 +457,7 @@ void Item_ident::print(String *str)
{
if
(
table_name
[
0
])
{
append_identifier
(
thd
,
str
,
t
able_name
,
strlen
(
table
_name
));
append_identifier
(
thd
,
str
,
t
_name
,
strlen
(
t
_name
));
str
->
append
(
'.'
);
append_identifier
(
thd
,
str
,
field_name
,
strlen
(
field_name
));
}
...
...
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