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
55f962c0
Commit
55f962c0
authored
Jun 10, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
6a9ce670
ff3f735c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
7 deletions
+42
-7
client/mysql.cc
client/mysql.cc
+22
-2
mysql-test/r/lowercase_table2.result
mysql-test/r/lowercase_table2.result
+6
-1
mysql-test/t/lowercase_table2.test
mysql-test/t/lowercase_table2.test
+9
-1
sql/mysqld.cc
sql/mysqld.cc
+5
-3
No files found.
client/mysql.cc
View file @
55f962c0
...
@@ -953,6 +953,7 @@ static int read_lines(bool execute_commands)
...
@@ -953,6 +953,7 @@ static int read_lines(bool execute_commands)
{
{
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
char
linebuffer
[
254
];
char
linebuffer
[
254
];
String
buffer
;
#endif
#endif
char
*
line
;
char
*
line
;
char
in_string
=
0
;
char
in_string
=
0
;
...
@@ -994,8 +995,24 @@ static int read_lines(bool execute_commands)
...
@@ -994,8 +995,24 @@ static int read_lines(bool execute_commands)
*
p
=
'\0'
;
*
p
=
'\0'
;
}
}
#else
#else
linebuffer
[
0
]
=
(
char
)
sizeof
(
linebuffer
);
buffer
.
length
(
0
);
line
=
_cgets
(
linebuffer
);
/* _cgets() expects the buffer size - 3 as the first byte */
linebuffer
[
0
]
=
(
char
)
sizeof
(
linebuffer
)
-
3
;
do
{
line
=
_cgets
(
linebuffer
);
buffer
.
append
(
line
,
(
unsigned
char
)
linebuffer
[
1
]);
/*
If _cgets() gets an input line that is linebuffer[0] bytes
long, the next call to _cgets() will return immediately with
linebuffer[1] == 0, and it does the same thing for input that
is linebuffer[0]-1 bytes long. So it appears that even though
_cgets() replaces the newline (which is two bytes on Window) with
a nil, it still needs the space in the linebuffer for it. This is,
naturally, undocumented.
*/
}
while
(
linebuffer
[
0
]
<=
linebuffer
[
1
]
+
1
);
line
=
buffer
.
c_ptr
();
#endif
/* __NETWARE__ */
#endif
/* __NETWARE__ */
#else
#else
if
(
opt_outfile
)
if
(
opt_outfile
)
...
@@ -1052,6 +1069,9 @@ static int read_lines(bool execute_commands)
...
@@ -1052,6 +1069,9 @@ static int read_lines(bool execute_commands)
status
.
exit_status
=
0
;
status
.
exit_status
=
0
;
}
}
}
}
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
buffer
.
free
();
#endif
return
status
.
exit_status
;
return
status
.
exit_status
;
}
}
...
...
mysql-test/r/lowercase_table2.result
View file @
55f962c0
DROP TABLE IF EXISTS t1,t2,
T1,T2,t3,T
3;
DROP TABLE IF EXISTS t1,t2,
t
3;
DROP DATABASE IF EXISTS `TEST_$1`;
DROP DATABASE IF EXISTS `TEST_$1`;
DROP DATABASE IF EXISTS `test_$1`;
DROP DATABASE IF EXISTS `test_$1`;
CREATE TABLE T1 (a int);
CREATE TABLE T1 (a int);
...
@@ -159,3 +159,8 @@ select * from myUC;
...
@@ -159,3 +159,8 @@ select * from myUC;
i
i
use test;
use test;
drop database mysqltest_LC2;
drop database mysqltest_LC2;
create table t2aA (col1 int);
create table t1Aa (col1 int);
select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
col1
drop table t2aA, t1Aa;
mysql-test/t/lowercase_table2.test
View file @
55f962c0
...
@@ -10,7 +10,7 @@ show variables like "lower_case_table_names";
...
@@ -10,7 +10,7 @@ show variables like "lower_case_table_names";
enable_query_log
;
enable_query_log
;
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
,
T1
,
T2
,
t3
,
T
3
;
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t
3
;
DROP
DATABASE
IF
EXISTS
`TEST_$1`
;
DROP
DATABASE
IF
EXISTS
`TEST_$1`
;
DROP
DATABASE
IF
EXISTS
`test_$1`
;
DROP
DATABASE
IF
EXISTS
`test_$1`
;
--
enable_warnings
--
enable_warnings
...
@@ -128,3 +128,11 @@ create table myUC (i int);
...
@@ -128,3 +128,11 @@ create table myUC (i int);
select
*
from
myUC
;
select
*
from
myUC
;
use
test
;
use
test
;
drop
database
mysqltest_LC2
;
drop
database
mysqltest_LC2
;
#
# Bug #9500: Problem with WHERE clause
#
create
table
t2aA
(
col1
int
);
create
table
t1Aa
(
col1
int
);
select
t1Aa
.
col1
from
t1aA
,
t2Aa
where
t1Aa
.
col1
=
t2aA
.
col1
;
drop
table
t2aA
,
t1Aa
;
sql/mysqld.cc
View file @
55f962c0
...
@@ -3095,6 +3095,11 @@ You should consider changing lower_case_table_names to 1 or 2",
...
@@ -3095,6 +3095,11 @@ You should consider changing lower_case_table_names to 1 or 2",
lower_case_table_names
=
0
;
lower_case_table_names
=
0
;
}
}
/* Reset table_alias_charset, now that lower_case_table_names is set. */
table_alias_charset
=
(
lower_case_table_names
?
files_charset_info
:
&
my_charset_bin
);
select_thread
=
pthread_self
();
select_thread
=
pthread_self
();
select_thread_in_use
=
1
;
select_thread_in_use
=
1
;
init_ssl
();
init_ssl
();
...
@@ -6795,9 +6800,6 @@ static void get_options(int argc,char **argv)
...
@@ -6795,9 +6800,6 @@ static void get_options(int argc,char **argv)
/* Set global variables based on startup options */
/* Set global variables based on startup options */
myisam_block_size
=
(
uint
)
1
<<
my_bit_log2
(
opt_myisam_block_size
);
myisam_block_size
=
(
uint
)
1
<<
my_bit_log2
(
opt_myisam_block_size
);
table_alias_charset
=
(
lower_case_table_names
?
files_charset_info
:
&
my_charset_bin
);
if
(
opt_short_log_format
)
if
(
opt_short_log_format
)
opt_specialflag
|=
SPECIAL_SHORT_LOG_FORMAT
;
opt_specialflag
|=
SPECIAL_SHORT_LOG_FORMAT
;
...
...
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