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
fb8758d6
Commit
fb8758d6
authored
Dec 18, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #7210: information_schema: can't access when table-name = reserved word
parent
491baa97
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
0 deletions
+36
-0
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+17
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+7
-0
sql/sql_parse.cc
sql/sql_parse.cc
+9
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-0
No files found.
mysql-test/r/information_schema.result
View file @
fb8758d6
...
@@ -590,6 +590,23 @@ TABLES
...
@@ -590,6 +590,23 @@ TABLES
TABLE_PRIVILEGES
TABLE_PRIVILEGES
TABLE_CONSTRAINTS
TABLE_CONSTRAINTS
TABLE_NAMES
TABLE_NAMES
select table_name from tables where table_name='user';
table_name
user
select column_name, privileges from columns
where table_name='user' and column_name like '%o%';
column_name privileges
Host select,insert,update,references
Password select,insert,update,references
Drop_priv select,insert,update,references
Reload_priv select,insert,update,references
Shutdown_priv select,insert,update,references
Process_priv select,insert,update,references
Show_db_priv select,insert,update,references
Lock_tables_priv select,insert,update,references
Show_view_priv select,insert,update,references
max_questions select,insert,update,references
max_connections select,insert,update,references
use test;
use test;
create function sub1(i int) returns int
create function sub1(i int) returns int
return i+1;
return i+1;
...
...
mysql-test/t/information_schema.test
View file @
fb8758d6
...
@@ -293,6 +293,13 @@ show tables;
...
@@ -293,6 +293,13 @@ show tables;
use
information_schema
;
use
information_schema
;
show
tables
like
"T%"
;
show
tables
like
"T%"
;
#
# Bug#7210: information_schema: can't access when table-name = reserved word
#
select
table_name
from
tables
where
table_name
=
'user'
;
select
column_name
,
privileges
from
columns
where
table_name
=
'user'
and
column_name
like
'%o%'
;
#
#
# Bug#7212: information_schema: "Can't find file" errors if storage engine gone
# Bug#7212: information_schema: "Can't find file" errors if storage engine gone
# Bug#7211: information_schema: crash if bad view
# Bug#7211: information_schema: crash if bad view
...
...
sql/sql_parse.cc
View file @
fb8758d6
...
@@ -1583,6 +1583,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
...
@@ -1583,6 +1583,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
packet
,
(
uint
)
(
pend
-
packet
),
thd
->
charset
());
packet
,
(
uint
)
(
pend
-
packet
),
thd
->
charset
());
table_list
.
alias
=
table_list
.
real_name
=
conv_name
.
str
;
table_list
.
alias
=
table_list
.
real_name
=
conv_name
.
str
;
packet
=
pend
+
1
;
packet
=
pend
+
1
;
if
(
!
my_strcasecmp
(
system_charset_info
,
table_list
.
db
,
information_schema_name
.
str
))
{
ST_SCHEMA_TABLE
*
schema_table
=
find_schema_table
(
thd
,
table_list
.
alias
);
if
(
schema_table
)
table_list
.
schema_table
=
schema_table
;
}
/* command not cachable => no gap for data base name */
/* command not cachable => no gap for data base name */
if
(
!
(
thd
->
query
=
fields
=
thd
->
memdup
(
packet
,
thd
->
query_length
+
1
)))
if
(
!
(
thd
->
query
=
fields
=
thd
->
memdup
(
packet
,
thd
->
query_length
+
1
)))
break
;
break
;
...
...
sql/sql_yacc.yy
View file @
fb8758d6
...
@@ -6885,6 +6885,7 @@ keyword:
...
@@ -6885,6 +6885,7 @@ keyword:
| CLIENT_SYM {}
| CLIENT_SYM {}
| CLOSE_SYM {}
| CLOSE_SYM {}
| COLLATION_SYM {}
| COLLATION_SYM {}
| COLUMNS {}
| COMMENT_SYM {}
| COMMENT_SYM {}
| COMMITTED_SYM {}
| COMMITTED_SYM {}
| COMMIT_SYM {}
| COMMIT_SYM {}
...
@@ -7006,6 +7007,7 @@ keyword:
...
@@ -7006,6 +7007,7 @@ keyword:
| POLYGON {}
| POLYGON {}
| PREPARE_SYM {}
| PREPARE_SYM {}
| PREV_SYM {}
| PREV_SYM {}
| PRIVILEGES {}
| PROCESS {}
| PROCESS {}
| PROCESSLIST_SYM {}
| PROCESSLIST_SYM {}
| QUARTER_SYM {}
| QUARTER_SYM {}
...
@@ -7057,6 +7059,7 @@ keyword:
...
@@ -7057,6 +7059,7 @@ keyword:
| SUBDATE_SYM {}
| SUBDATE_SYM {}
| SUBJECT_SYM {}
| SUBJECT_SYM {}
| SUPER_SYM {}
| SUPER_SYM {}
| TABLES {}
| TABLESPACE {}
| TABLESPACE {}
| TEMPORARY {}
| TEMPORARY {}
| TEMPTABLE_SYM {}
| TEMPTABLE_SYM {}
...
...
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