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
3eda53fb
Commit
3eda53fb
authored
Dec 22, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for error message when using HANDLER OPEN on InnoDB tables.
parent
9e9e765f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
8 deletions
+19
-8
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+7
-2
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+7
-2
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/sql_handler.cc
sql/sql_handler.cc
+4
-3
No files found.
mysql-test/r/innodb.result
View file @
3eda53fb
...
@@ -900,8 +900,13 @@ explain select a,b,c from t1;
...
@@ -900,8 +900,13 @@ explain select a,b,c from t1;
table type possible_keys key key_len ref rows Extra
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 4
t1 ALL NULL NULL NULL NULL 4
drop table t1;
drop table t1;
create table t1 (t
estint int not null default 1
) type=innodb;
create table t1 (t
int not null default 1, key (t)
) type=innodb;
desc t1;
desc t1;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
testint int(11) 1
t int(11) MUL 1
handler t1 open t1;
Table handler for 't1' doesn't have this option
handler t1 read t first;
Unknown table 't1' in HANDLER
handler t1 close;
drop table t1;
drop table t1;
mysql-test/t/innodb.test
View file @
3eda53fb
...
@@ -565,9 +565,14 @@ explain select a,b,c from t1;
...
@@ -565,9 +565,14 @@ explain select a,b,c from t1;
drop
table
t1
;
drop
table
t1
;
#
#
# Check describe
# Check describe
& handler
#
#
create
table
t1
(
t
estint
int
not
null
default
1
)
type
=
innodb
;
create
table
t1
(
t
int
not
null
default
1
,
key
(
t
)
)
type
=
innodb
;
desc
t1
;
desc
t1
;
--
error
1031
handler
t1
open
t1
;
--
error
1109
handler
t1
read
t
first
;
handler
t1
close
;
drop
table
t1
;
drop
table
t1
;
sql/mysql_priv.h
View file @
3eda53fb
...
@@ -436,7 +436,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables);
...
@@ -436,7 +436,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables);
/* sql_handler.cc */
/* sql_handler.cc */
int
mysql_ha_open
(
THD
*
thd
,
TABLE_LIST
*
tables
);
int
mysql_ha_open
(
THD
*
thd
,
TABLE_LIST
*
tables
);
int
mysql_ha_close
(
THD
*
thd
,
TABLE_LIST
*
tables
);
int
mysql_ha_close
(
THD
*
thd
,
TABLE_LIST
*
tables
,
bool
dont_send_ok
=
0
);
int
mysql_ha_read
(
THD
*
,
TABLE_LIST
*
,
enum
enum_ha_read_modes
,
char
*
,
int
mysql_ha_read
(
THD
*
,
TABLE_LIST
*
,
enum
enum_ha_read_modes
,
char
*
,
List
<
Item
>
*
,
enum
ha_rkey_function
,
Item
*
,
ha_rows
,
ha_rows
);
List
<
Item
>
*
,
enum
ha_rkey_function
,
Item
*
,
ha_rows
,
ha_rows
);
...
...
sql/sql_handler.cc
View file @
3eda53fb
...
@@ -58,6 +58,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
...
@@ -58,6 +58,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
if
(
!
(
tables
->
table
->
file
->
option_flag
()
&
HA_CAN_SQL_HANDLER
))
if
(
!
(
tables
->
table
->
file
->
option_flag
()
&
HA_CAN_SQL_HANDLER
))
{
{
my_printf_error
(
ER_ILLEGAL_HA
,
ER
(
ER_ILLEGAL_HA
),
MYF
(
0
),
tables
->
name
);
my_printf_error
(
ER_ILLEGAL_HA
,
ER
(
ER_ILLEGAL_HA
),
MYF
(
0
),
tables
->
name
);
mysql_ha_close
(
thd
,
tables
,
1
);
return
-
1
;
return
-
1
;
}
}
...
@@ -65,7 +66,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
...
@@ -65,7 +66,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
return
0
;
return
0
;
}
}
int
mysql_ha_close
(
THD
*
thd
,
TABLE_LIST
*
tables
)
int
mysql_ha_close
(
THD
*
thd
,
TABLE_LIST
*
tables
,
bool
dont_send_ok
)
{
{
TABLE
**
ptr
=
find_table_ptr_by_name
(
thd
,
tables
->
db
,
tables
->
name
);
TABLE
**
ptr
=
find_table_ptr_by_name
(
thd
,
tables
->
db
,
tables
->
name
);
...
@@ -75,8 +76,8 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables)
...
@@ -75,8 +76,8 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables)
close_thread_table
(
thd
,
ptr
);
close_thread_table
(
thd
,
ptr
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
}
}
if
(
!
dont_send_ok
)
send_ok
(
&
thd
->
net
);
send_ok
(
&
thd
->
net
);
return
0
;
return
0
;
}
}
...
...
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