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
d081aa36
Commit
d081aa36
authored
Mar 29, 2010
by
Aleksandr Kuzminsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync with extensions-1.0.6 Rev. 154
parent
d77cc72a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
11076 deletions
+72
-11076
handler/ha_innodb.cc
handler/ha_innodb.cc
+17
-0
handler/ha_innodb.cc.orig
handler/ha_innodb.cc.orig
+0
-11064
handler/i_s.cc
handler/i_s.cc
+54
-11
include/univ.i
include/univ.i
+1
-1
No files found.
handler/ha_innodb.cc
View file @
d081aa36
...
...
@@ -4712,6 +4712,10 @@ ha_innobase::write_row(
error
=
row_insert_for_mysql
((
byte
*
)
record
,
prebuilt
);
#ifdef EXTENDED_FOR_USERSTAT
if
(
error
==
DB_SUCCESS
)
rows_changed
++
;
#endif
/* Handle duplicate key errors */
if
(
auto_inc_used
)
{
ulint
err
;
...
...
@@ -5056,6 +5060,10 @@ ha_innobase::update_row(
}
}
#ifdef EXTENDED_FOR_USERSTAT
if
(
error
==
DB_SUCCESS
)
rows_changed
++
;
#endif
innodb_srv_conc_exit_innodb
(
trx
);
error
=
convert_error_code_to_mysql
(
error
,
...
...
@@ -5117,6 +5125,10 @@ ha_innobase::delete_row(
error
=
row_update_for_mysql
((
byte
*
)
record
,
prebuilt
);
#ifdef EXTENDED_FOR_USERSTAT
if
(
error
==
DB_SUCCESS
)
rows_changed
++
;
#endif
innodb_srv_conc_exit_innodb
(
trx
);
error
=
convert_error_code_to_mysql
(
...
...
@@ -5649,6 +5661,11 @@ ha_innobase::general_fetch(
case
DB_SUCCESS
:
error
=
0
;
table
->
status
=
0
;
#ifdef EXTENDED_FOR_USERSTAT
rows_read
++
;
if
(
active_index
>=
0
&&
active_index
<
MAX_KEY
)
index_rows_read
[
active_index
]
++
;
#endif
break
;
case
DB_RECORD_NOT_FOUND
:
error
=
HA_ERR_END_OF_FILE
;
...
...
handler/ha_innodb.cc.orig
deleted
100644 → 0
View file @
d77cc72a
This diff is collapsed.
Click to expand it.
handler/i_s.cc
View file @
d081aa36
...
...
@@ -2665,6 +2665,14 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_rseg =
*/
static
ST_FIELD_INFO
i_s_innodb_table_stats_info
[]
=
{
{
STRUCT_FLD
(
field_name
,
"table_schema"
),
STRUCT_FLD
(
field_length
,
NAME_LEN
),
STRUCT_FLD
(
field_type
,
MYSQL_TYPE_STRING
),
STRUCT_FLD
(
value
,
0
),
STRUCT_FLD
(
field_flags
,
0
),
STRUCT_FLD
(
old_name
,
""
),
STRUCT_FLD
(
open_method
,
SKIP_OPEN_TABLE
)},
{
STRUCT_FLD
(
field_name
,
"table_name"
),
STRUCT_FLD
(
field_length
,
NAME_LEN
),
STRUCT_FLD
(
field_type
,
MYSQL_TYPE_STRING
),
...
...
@@ -2710,6 +2718,14 @@ static ST_FIELD_INFO i_s_innodb_table_stats_info[] =
static
ST_FIELD_INFO
i_s_innodb_index_stats_info
[]
=
{
{
STRUCT_FLD
(
field_name
,
"table_schema"
),
STRUCT_FLD
(
field_length
,
NAME_LEN
),
STRUCT_FLD
(
field_type
,
MYSQL_TYPE_STRING
),
STRUCT_FLD
(
value
,
0
),
STRUCT_FLD
(
field_flags
,
0
),
STRUCT_FLD
(
old_name
,
""
),
STRUCT_FLD
(
open_method
,
SKIP_OPEN_TABLE
)},
{
STRUCT_FLD
(
field_name
,
"table_name"
),
STRUCT_FLD
(
field_length
,
NAME_LEN
),
STRUCT_FLD
(
field_type
,
MYSQL_TYPE_STRING
),
...
...
@@ -2785,16 +2801,30 @@ i_s_innodb_table_stats_fill(
table
=
UT_LIST_GET_FIRST
(
dict_sys
->
table_LRU
);
while
(
table
)
{
char
buf
[
NAME_LEN
*
2
+
2
];
char
*
ptr
;
if
(
table
->
stat_clustered_index_size
==
0
)
{
table
=
UT_LIST_GET_NEXT
(
table_LRU
,
table
);
continue
;
}
field_store_string
(
i_s_table
->
field
[
0
],
table
->
name
);
i_s_table
->
field
[
1
]
->
store
(
table
->
stat_n_rows
);
i_s_table
->
field
[
2
]
->
store
(
table
->
stat_clustered_index_size
);
i_s_table
->
field
[
3
]
->
store
(
table
->
stat_sum_of_other_index_sizes
);
i_s_table
->
field
[
4
]
->
store
(
table
->
stat_modified_counter
);
buf
[
NAME_LEN
*
2
+
1
]
=
0
;
strncpy
(
buf
,
table
->
name
,
NAME_LEN
*
2
+
1
);
ptr
=
strchr
(
buf
,
'/'
);
if
(
ptr
)
{
*
ptr
=
'\0'
;
++
ptr
;
}
else
{
ptr
=
buf
;
}
field_store_string
(
i_s_table
->
field
[
0
],
buf
);
field_store_string
(
i_s_table
->
field
[
1
],
ptr
);
i_s_table
->
field
[
2
]
->
store
(
table
->
stat_n_rows
);
i_s_table
->
field
[
3
]
->
store
(
table
->
stat_clustered_index_size
);
i_s_table
->
field
[
4
]
->
store
(
table
->
stat_sum_of_other_index_sizes
);
i_s_table
->
field
[
5
]
->
store
(
table
->
stat_modified_counter
);
if
(
schema_table_store_record
(
thd
,
i_s_table
))
{
status
=
1
;
...
...
@@ -2850,11 +2880,24 @@ i_s_innodb_index_stats_fill(
while
(
index
)
{
char
buff
[
256
+
1
];
char
row_per_keys
[
256
+
1
];
char
buf
[
NAME_LEN
*
2
+
2
];
char
*
ptr
;
ulint
i
;
field_store_string
(
i_s_table
->
field
[
0
],
table
->
name
);
field_store_string
(
i_s_table
->
field
[
1
],
index
->
name
);
i_s_table
->
field
[
2
]
->
store
(
index
->
n_uniq
);
buf
[
NAME_LEN
*
2
+
1
]
=
0
;
strncpy
(
buf
,
table
->
name
,
NAME_LEN
*
2
+
1
);
ptr
=
strchr
(
buf
,
'/'
);
if
(
ptr
)
{
*
ptr
=
'\0'
;
++
ptr
;
}
else
{
ptr
=
buf
;
}
field_store_string
(
i_s_table
->
field
[
0
],
buf
);
field_store_string
(
i_s_table
->
field
[
1
],
ptr
);
field_store_string
(
i_s_table
->
field
[
2
],
index
->
name
);
i_s_table
->
field
[
3
]
->
store
(
index
->
n_uniq
);
row_per_keys
[
0
]
=
'\0'
;
if
(
index
->
stat_n_diff_key_vals
)
{
...
...
@@ -2870,10 +2913,10 @@ i_s_innodb_index_stats_fill(
strncat
(
row_per_keys
,
buff
,
256
-
strlen
(
row_per_keys
));
}
}
field_store_string
(
i_s_table
->
field
[
3
],
row_per_keys
);
field_store_string
(
i_s_table
->
field
[
4
],
row_per_keys
);
i_s_table
->
field
[
4
]
->
store
(
index
->
stat_index_size
);
i_s_table
->
field
[
5
]
->
store
(
index
->
stat_n_leaf_pages
);
i_s_table
->
field
[
5
]
->
store
(
index
->
stat_index_size
);
i_s_table
->
field
[
6
]
->
store
(
index
->
stat_n_leaf_pages
);
if
(
schema_table_store_record
(
thd
,
i_s_table
))
{
status
=
1
;
...
...
include/univ.i
View file @
d081aa36
...
...
@@ -49,7 +49,7 @@ Created 1/20/1994 Heikki Tuuri
#
define
INNODB_VERSION_BUGFIX
6
#
ifndef
PERCONA_INNODB_VERSION
#
define
PERCONA_INNODB_VERSION
10
#
define
PERCONA_INNODB_VERSION
unknown
#
endif
...
...
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