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
8813b5eb
Commit
8813b5eb
authored
Jun 24, 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
1b6b5e88
62aeb886
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
76 additions
and
63 deletions
+76
-63
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+29
-29
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+7
-7
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+20
-20
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+7
-5
sql/handler.cc
sql/handler.cc
+8
-2
sql/sql_show.cc
sql/sql_show.cc
+3
-0
sql/table.cc
sql/table.cc
+1
-0
sql/table.h
sql/table.h
+1
-0
No files found.
mysql-test/r/show_check.result
View file @
8813b5eb
...
@@ -43,7 +43,7 @@ wait_timeout 28800
...
@@ -43,7 +43,7 @@ wait_timeout 28800
show variables like "this_doesn't_exists%";
show variables like "this_doesn't_exists%";
Variable_name Value
Variable_name Value
show table status from test like "this_doesn't_exists%";
show table status from test like "this_doesn't_exists%";
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
show databases;
show databases;
Database
Database
mysql
mysql
...
@@ -309,58 +309,58 @@ insert into t1 values (1),(2);
...
@@ -309,58 +309,58 @@ insert into t1 values (1),(2);
insert into t2 values (1),(2);
insert into t2 values (1),(2);
insert into t3 values (1,1),(2,2);
insert into t3 values (1,1),(2,2);
show table status;
show table status;
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 2 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t1 HEAP
9
Fixed 2 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 2 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP
9
Fixed 2 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 2 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP
9
Fixed 2 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values (3),(4);
insert into t1 values (3),(4);
insert into t2 values (3),(4);
insert into t2 values (3),(4);
insert into t3 values (3,3),(4,4);
insert into t3 values (3,3),(4,4);
show table status;
show table status;
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 4 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t1 HEAP
9
Fixed 4 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 4 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP
9
Fixed 4 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 4 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP
9
Fixed 4 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values (5);
insert into t1 values (5);
insert into t2 values (5);
insert into t2 values (5);
insert into t3 values (5,5);
insert into t3 values (5,5);
show table status;
show table status;
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 5 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t1 HEAP
9
Fixed 5 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 5 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP
9
Fixed 5 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 5 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP
9
Fixed 5 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
delete from t1 where a=3;
delete from t1 where a=3;
delete from t2 where b=3;
delete from t2 where b=3;
delete from t3 where a=3;
delete from t3 where a=3;
show table status;
show table status;
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 4 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t1 HEAP
9
Fixed 4 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 4 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP
9
Fixed 4 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 4 9 # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP
9
Fixed 4 9 # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL
delete from t1;
delete from t1;
delete from t2;
delete from t2;
delete from t3;
delete from t3;
show table status;
show table status;
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 0 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t1 HEAP
9
Fixed 0 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 0 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP
9
Fixed 0 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 0 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP
9
Fixed 0 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values (5);
insert into t1 values (5);
insert into t2 values (5);
insert into t2 values (5);
insert into t3 values (5,5);
insert into t3 values (5,5);
show table status;
show table status;
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 1 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t1 HEAP
9
Fixed 1 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 1 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP
9
Fixed 1 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 1 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP
9
Fixed 1 9 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
delete from t1 where a=5;
delete from t1 where a=5;
delete from t2 where b=5;
delete from t2 where b=5;
delete from t3 where a=5;
delete from t3 where a=5;
show table status;
show table status;
Name Engine Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine
Version
Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t1 HEAP
9
Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP
9
Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 0 9 # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP
9
Fixed 0 9 # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL
drop table t1, t2, t3;
drop table t1, t2, t3;
create database test_$1;
create database test_$1;
show create database test_$1;
show create database test_$1;
...
...
mysql-test/t/show_check.test
View file @
8813b5eb
...
@@ -222,37 +222,37 @@ CREATE TABLE t3 (
...
@@ -222,37 +222,37 @@ CREATE TABLE t3 (
insert
into
t1
values
(
1
),(
2
);
insert
into
t1
values
(
1
),(
2
);
insert
into
t2
values
(
1
),(
2
);
insert
into
t2
values
(
1
),(
2
);
insert
into
t3
values
(
1
,
1
),(
2
,
2
);
insert
into
t3
values
(
1
,
1
),(
2
,
2
);
--
replace_column
6
# 7 # 8
#
--
replace_column
7
# 8 # 9
#
show
table
status
;
show
table
status
;
insert
into
t1
values
(
3
),(
4
);
insert
into
t1
values
(
3
),(
4
);
insert
into
t2
values
(
3
),(
4
);
insert
into
t2
values
(
3
),(
4
);
insert
into
t3
values
(
3
,
3
),(
4
,
4
);
insert
into
t3
values
(
3
,
3
),(
4
,
4
);
--
replace_column
6
# 7 # 8
#
--
replace_column
7
# 8 # 9
#
show
table
status
;
show
table
status
;
insert
into
t1
values
(
5
);
insert
into
t1
values
(
5
);
insert
into
t2
values
(
5
);
insert
into
t2
values
(
5
);
insert
into
t3
values
(
5
,
5
);
insert
into
t3
values
(
5
,
5
);
--
replace_column
6
# 7 # 8
#
--
replace_column
7
# 8 # 9
#
show
table
status
;
show
table
status
;
delete
from
t1
where
a
=
3
;
delete
from
t1
where
a
=
3
;
delete
from
t2
where
b
=
3
;
delete
from
t2
where
b
=
3
;
delete
from
t3
where
a
=
3
;
delete
from
t3
where
a
=
3
;
--
replace_column
6
# 7 # 8
#
--
replace_column
7
# 8 # 9
#
show
table
status
;
show
table
status
;
delete
from
t1
;
delete
from
t1
;
delete
from
t2
;
delete
from
t2
;
delete
from
t3
;
delete
from
t3
;
--
replace_column
6
# 7 # 8
#
--
replace_column
7
# 8 # 9
#
show
table
status
;
show
table
status
;
insert
into
t1
values
(
5
);
insert
into
t1
values
(
5
);
insert
into
t2
values
(
5
);
insert
into
t2
values
(
5
);
insert
into
t3
values
(
5
,
5
);
insert
into
t3
values
(
5
,
5
);
--
replace_column
6
# 7 # 8
#
--
replace_column
7
# 8 # 9
#
show
table
status
;
show
table
status
;
delete
from
t1
where
a
=
5
;
delete
from
t1
where
a
=
5
;
delete
from
t2
where
b
=
5
;
delete
from
t2
where
b
=
5
;
delete
from
t3
where
a
=
5
;
delete
from
t3
where
a
=
5
;
--
replace_column
6
# 7 # 8
#
--
replace_column
7
# 8 # 9
#
show
table
status
;
show
table
status
;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
...
...
sql/ha_ndbcluster.cc
View file @
8813b5eb
...
@@ -474,33 +474,28 @@ static const ulong index_type_flags[]=
...
@@ -474,33 +474,28 @@ static const ulong index_type_flags[]=
0
,
0
,
/* PRIMARY_KEY_INDEX */
/* PRIMARY_KEY_INDEX */
HA_NOT_READ_PREFIX_LAST
|
HA_ONLY_WHOLE_INDEX
,
HA_ONLY_WHOLE_INDEX
|
HA_WRONG_ASCII_ORDER
,
/* PRIMARY_KEY_ORDERED_INDEX */
/* PRIMARY_KEY_ORDERED_INDEX */
/*
/*
Enable HA_KEY
_
READ_ONLY when "sorted" indexes are supported,
Enable HA_KEYREAD_ONLY when "sorted" indexes are supported,
thus ORDERD BY clauses can be optimized by reading directly
thus ORDERD BY clauses can be optimized by reading directly
through the index.
through the index.
*/
*/
HA_NOT_READ_PREFIX_LAST
|
// HA_KEYREAD_ONLY |
HA_WRONG_ASCII_ORDER
,
HA_READ_NEXT
|
HA_READ_RANGE
,
/* UNIQUE_INDEX */
/* UNIQUE_INDEX */
HA_NOT_READ_PREFIX_LAST
|
HA_ONLY_WHOLE_INDEX
,
HA_ONLY_WHOLE_INDEX
|
HA_WRONG_ASCII_ORDER
,
/* UNIQUE_ORDERED_INDEX */
/* UNIQUE_ORDERED_INDEX */
HA_
NOT_READ_PREFIX_LAST
|
HA_
READ_NEXT
|
HA_
WRONG_ASCII_ORDER
,
HA_
READ_RANGE
,
/* ORDERED_INDEX */
/* ORDERED_INDEX */
HA_READ_NEXT
|
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RANGE
,
HA_NOT_READ_PREFIX_LAST
|
HA_WRONG_ASCII_ORDER
};
};
static
const
int
index_flags_size
=
sizeof
(
index_type_flags
)
/
sizeof
(
ulong
);
static
const
int
index_flags_size
=
sizeof
(
index_type_flags
)
/
sizeof
(
ulong
);
...
@@ -529,7 +524,7 @@ inline NDB_INDEX_TYPE ha_ndbcluster::get_index_type(uint idx_no) const
...
@@ -529,7 +524,7 @@ inline NDB_INDEX_TYPE ha_ndbcluster::get_index_type(uint idx_no) const
flags depending on the type of the index.
flags depending on the type of the index.
*/
*/
inline
ulong
ha_ndbcluster
::
index_flags
(
uint
idx_no
)
const
inline
ulong
ha_ndbcluster
::
index_flags
(
uint
idx_no
,
uint
part
)
const
{
{
DBUG_ENTER
(
"index_flags"
);
DBUG_ENTER
(
"index_flags"
);
DBUG_PRINT
(
"info"
,
(
"idx_no: %d"
,
idx_no
));
DBUG_PRINT
(
"info"
,
(
"idx_no: %d"
,
idx_no
));
...
@@ -1390,6 +1385,7 @@ void ha_ndbcluster::print_results()
...
@@ -1390,6 +1385,7 @@ void ha_ndbcluster::print_results()
switch
(
col
->
getType
())
{
switch
(
col
->
getType
())
{
case
NdbDictionary
:
:
Column
::
Blob
:
case
NdbDictionary
:
:
Column
::
Blob
:
case
NdbDictionary
:
:
Column
::
Clob
:
case
NdbDictionary
:
:
Column
::
Undefined
:
case
NdbDictionary
:
:
Column
::
Undefined
:
fprintf
(
DBUG_FILE
,
"Unknown type: %d"
,
col
->
getType
());
fprintf
(
DBUG_FILE
,
"Unknown type: %d"
,
col
->
getType
());
break
;
break
;
...
@@ -2622,13 +2618,9 @@ ha_ndbcluster::ha_ndbcluster(TABLE *table_arg):
...
@@ -2622,13 +2618,9 @@ ha_ndbcluster::ha_ndbcluster(TABLE *table_arg):
m_ndb
(
NULL
),
m_ndb
(
NULL
),
m_table
(
NULL
),
m_table
(
NULL
),
m_table_flags
(
HA_REC_NOT_IN_SEQ
|
m_table_flags
(
HA_REC_NOT_IN_SEQ
|
HA_KEYPOS_TO_RNDPOS
|
HA_NOT_EXACT_COUNT
|
HA_NOT_EXACT_COUNT
|
HA_NO_WRITE_DELAYED
|
HA_NO_PREFIX_CHAR_KEYS
|
HA_NO_PREFIX_CHAR_KEYS
|
HA_NO_BLOBS
|
HA_NO_BLOBS
),
HA_DROP_BEFORE_CREATE
|
HA_NOT_READ_AFTER_KEY
),
m_use_write
(
false
),
m_use_write
(
false
),
retrieve_all_fields
(
FALSE
),
retrieve_all_fields
(
FALSE
),
rows_to_insert
(
0
),
rows_to_insert
(
0
),
...
@@ -2941,6 +2933,14 @@ bool ndbcluster_end()
...
@@ -2941,6 +2933,14 @@ bool ndbcluster_end()
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
void
ndbcluster_print_error
(
int
error
)
{
DBUG_ENTER
(
"ndbcluster_print_error"
);
TABLE
tab
;
tab
.
table_name
=
NULL
;
ha_ndbcluster
error_handler
(
&
tab
);
error_handler
.
print_error
(
error
,
MYF
(
0
));
}
/*
/*
Set m_tabname from full pathname to table file
Set m_tabname from full pathname to table file
...
...
sql/ha_ndbcluster.h
View file @
8813b5eb
...
@@ -93,11 +93,12 @@ class ha_ndbcluster: public handler
...
@@ -93,11 +93,12 @@ class ha_ndbcluster: public handler
const
char
*
table_type
()
const
{
return
(
"ndbcluster"
);}
const
char
*
table_type
()
const
{
return
(
"ndbcluster"
);}
const
char
**
bas_ext
()
const
;
const
char
**
bas_ext
()
const
;
ulong
table_flags
(
void
)
const
{
return
m_table_flags
;
}
ulong
table_flags
(
void
)
const
{
return
m_table_flags
;
}
ulong
index_flags
(
uint
idx
)
const
;
ulong
index_flags
(
uint
idx
,
uint
part
)
const
;
uint
max_record_length
()
const
{
return
NDB_MAX_TUPLE_SIZE
;
};
uint
max_supported_record_length
()
const
{
return
NDB_MAX_TUPLE_SIZE
;
};
uint
max_keys
()
const
{
return
MAX_KEY
;
}
uint
max_supported_keys
()
const
{
return
MAX_KEY
;
}
uint
max_key_parts
()
const
{
return
NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY
;
};
uint
max_supported_key_parts
()
const
uint
max_key_length
()
const
{
return
NDB_MAX_KEY_SIZE
;};
{
return
NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY
;
};
uint
max_supported_key_length
()
const
{
return
NDB_MAX_KEY_SIZE
;};
int
rename_table
(
const
char
*
from
,
const
char
*
to
);
int
rename_table
(
const
char
*
from
,
const
char
*
to
);
int
delete_table
(
const
char
*
name
);
int
delete_table
(
const
char
*
name
);
...
@@ -227,6 +228,7 @@ int ndbcluster_discover(const char* dbname, const char* name,
...
@@ -227,6 +228,7 @@ int ndbcluster_discover(const char* dbname, const char* name,
const
void
**
frmblob
,
uint
*
frmlen
);
const
void
**
frmblob
,
uint
*
frmlen
);
int
ndbcluster_drop_database
(
const
char
*
path
);
int
ndbcluster_drop_database
(
const
char
*
path
);
void
ndbcluster_print_error
(
int
error
);
...
...
sql/handler.cc
View file @
8813b5eb
...
@@ -496,7 +496,10 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
...
@@ -496,7 +496,10 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
{
{
if
((
error
=
ndbcluster_commit
(
thd
,
trans
->
ndb_tid
)))
if
((
error
=
ndbcluster_commit
(
thd
,
trans
->
ndb_tid
)))
{
{
my_error
(
ER_ERROR_DURING_COMMIT
,
MYF
(
0
),
error
);
if
(
error
==
-
1
)
my_error
(
ER_ERROR_DURING_COMMIT
,
MYF
(
0
),
error
);
else
ndbcluster_print_error
(
error
);
error
=
1
;
error
=
1
;
}
}
if
(
trans
==
&
thd
->
transaction
.
all
)
if
(
trans
==
&
thd
->
transaction
.
all
)
...
@@ -562,7 +565,10 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
...
@@ -562,7 +565,10 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
{
{
if
((
error
=
ndbcluster_rollback
(
thd
,
trans
->
ndb_tid
)))
if
((
error
=
ndbcluster_rollback
(
thd
,
trans
->
ndb_tid
)))
{
{
my_error
(
ER_ERROR_DURING_ROLLBACK
,
MYF
(
0
),
error
);
if
(
error
==
-
1
)
my_error
(
ER_ERROR_DURING_ROLLBACK
,
MYF
(
0
),
error
);
else
ndbcluster_print_error
(
error
);
error
=
1
;
error
=
1
;
}
}
trans
->
ndb_tid
=
0
;
trans
->
ndb_tid
=
0
;
...
...
sql/sql_show.cc
View file @
8813b5eb
...
@@ -473,6 +473,8 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
...
@@ -473,6 +473,8 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
field_list
.
push_back
(
item
=
new
Item_empty_string
(
"Name"
,
NAME_LEN
));
field_list
.
push_back
(
item
=
new
Item_empty_string
(
"Name"
,
NAME_LEN
));
field_list
.
push_back
(
item
=
new
Item_empty_string
(
"Engine"
,
10
));
field_list
.
push_back
(
item
=
new
Item_empty_string
(
"Engine"
,
10
));
item
->
maybe_null
=
1
;
item
->
maybe_null
=
1
;
field_list
.
push_back
(
item
=
new
Item_int
(
"Version"
,
(
longlong
)
0
,
21
));
item
->
maybe_null
=
1
;
field_list
.
push_back
(
item
=
new
Item_empty_string
(
"Row_format"
,
10
));
field_list
.
push_back
(
item
=
new
Item_empty_string
(
"Row_format"
,
10
));
item
->
maybe_null
=
1
;
item
->
maybe_null
=
1
;
field_list
.
push_back
(
item
=
new
Item_int
(
"Rows"
,(
longlong
)
1
,
21
));
field_list
.
push_back
(
item
=
new
Item_int
(
"Rows"
,(
longlong
)
1
,
21
));
...
@@ -533,6 +535,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
...
@@ -533,6 +535,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
handler
*
file
=
table
->
file
;
handler
*
file
=
table
->
file
;
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_TIME
|
HA_STATUS_NO_LOCK
);
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_TIME
|
HA_STATUS_NO_LOCK
);
protocol
->
store
(
file
->
table_type
(),
system_charset_info
);
protocol
->
store
(
file
->
table_type
(),
system_charset_info
);
protocol
->
store
((
ulonglong
)
table
->
frm_version
);
str
=
((
table
->
db_options_in_use
&
HA_OPTION_COMPRESS_RECORD
)
?
str
=
((
table
->
db_options_in_use
&
HA_OPTION_COMPRESS_RECORD
)
?
"Compressed"
:
"Compressed"
:
(
table
->
db_options_in_use
&
HA_OPTION_PACK_RECORD
)
?
(
table
->
db_options_in_use
&
HA_OPTION_PACK_RECORD
)
?
...
...
sql/table.cc
View file @
8813b5eb
...
@@ -126,6 +126,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -126,6 +126,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
goto
err_not_open
;
/* purecov: inspected */
goto
err_not_open
;
/* purecov: inspected */
*
fn_ext
(
index_file
)
=
'\0'
;
// Remove .frm extension
*
fn_ext
(
index_file
)
=
'\0'
;
// Remove .frm extension
outparam
->
frm_version
=
head
[
2
];
outparam
->
db_type
=
ha_checktype
((
enum
db_type
)
(
uint
)
*
(
head
+
3
));
outparam
->
db_type
=
ha_checktype
((
enum
db_type
)
(
uint
)
*
(
head
+
3
));
outparam
->
db_create_options
=
db_create_options
=
uint2korr
(
head
+
30
);
outparam
->
db_create_options
=
db_create_options
=
uint2korr
(
head
+
30
);
outparam
->
db_options_in_use
=
outparam
->
db_create_options
;
outparam
->
db_options_in_use
=
outparam
->
db_create_options
;
...
...
sql/table.h
View file @
8813b5eb
...
@@ -156,6 +156,7 @@ struct st_table {
...
@@ -156,6 +156,7 @@ struct st_table {
uint
quick_key_parts
[
MAX_KEY
];
uint
quick_key_parts
[
MAX_KEY
];
key_part_map
const_key_parts
[
MAX_KEY
];
key_part_map
const_key_parts
[
MAX_KEY
];
ulong
query_id
;
ulong
query_id
;
uchar
frm_version
;
union
/* Temporary variables */
union
/* Temporary variables */
{
{
...
...
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