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
cd7cfc2a
Commit
cd7cfc2a
authored
Dec 18, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into janus.mylan:/usr/home/serg/Abk/mysql-5.1
parents
99a5f6e9
fba0a6db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
162 additions
and
114 deletions
+162
-114
mysql-test/r/status.result
mysql-test/r/status.result
+19
-0
mysql-test/t/status.test
mysql-test/t/status.test
+19
-0
sql/handler.h
sql/handler.h
+92
-114
sql/mysqld.cc
sql/mysqld.cc
+32
-0
No files found.
mysql-test/r/status.result
View file @
cd7cfc2a
...
...
@@ -162,3 +162,22 @@ Variable_name Value
Com_show_status 8
rnd_diff tmp_table_diff
20 8
show global status like 'Com%function%';
Variable_name Value
Com_alter_function 0
Com_create_function 0
Com_create_spfunction 0
Com_drop_function 0
create function f1 (x INTEGER) returns integer
begin
declare ret integer;
set ret = x * 10;
return ret;
end //
drop function f1;
show global status like 'Com%function%';
Variable_name Value
Com_alter_function 0
Com_create_function 0
Com_create_spfunction 1
Com_drop_function 1
mysql-test/t/status.test
View file @
cd7cfc2a
...
...
@@ -242,4 +242,23 @@ let $tmp_table2 = `show global status like 'Created_tmp_tables'`;
eval
select
substring_index
(
'$rnd_next2'
,
0x9
,
-
1
)
-
substring_index
(
'$rnd_next'
,
0x9
,
-
1
)
as
rnd_diff
,
substring_index
(
'$tmp_table2'
,
0x9
,
-
1
)
-
substring_index
(
'$tmp_table'
,
0x9
,
-
1
)
as
tmp_table_diff
;
--
enable_query_log
#
# Bug#30252 Com_create_function is not incremented.
#
show
global
status
like
'Com%function%'
;
DELIMITER
//;
create
function
f1
(
x
INTEGER
)
returns
integer
begin
declare
ret
integer
;
set
ret
=
x
*
10
;
return
ret
;
end
//
DELIMITER
;
//
drop
function
f1
;
show
global
status
like
'Com%function%'
;
# End of 5.1 tests
sql/handler.h
View file @
cd7cfc2a
...
...
@@ -959,11 +959,11 @@ uint calculate_key_len(TABLE *, uint, const uchar *, key_part_map);
*/
#define make_prev_keypart_map(N) (((key_part_map)1 << (N)) - 1)
/*
/*
*
The handler class is the interface for dynamically loadable
storage engines. Do not add ifdefs and take care when adding or
changing virtual functions to avoid vtable confusion
*/
*/
class
handler
:
public
Sql_alloc
{
...
...
@@ -981,7 +981,7 @@ class handler :public Sql_alloc
virtual
int
index_init
(
uint
idx
,
bool
sorted
)
{
active_index
=
idx
;
return
0
;
}
virtual
int
index_end
()
{
active_index
=
MAX_KEY
;
return
0
;
}
/*
/*
*
rnd_init() can be called two times without rnd_end() in between
(it only makes sense if scan=1).
then the second call should prepare for the new table scan (e.g
...
...
@@ -1006,13 +1006,13 @@ class handler :public Sql_alloc
ha_statistics
stats
;
/* The following are for read_multi_range */
/*
*
The following are for read_multi_range */
bool
multi_range_sorted
;
KEY_MULTI_RANGE
*
multi_range_curr
;
KEY_MULTI_RANGE
*
multi_range_end
;
HANDLER_BUFFER
*
multi_range_buffer
;
/* The following are for read_range() */
/*
*
The following are for read_range() */
key_range
save_end_range
,
*
end_range
;
KEY_PART_INFO
*
range_key_part
;
int
key_compare_result_on_equal
;
...
...
@@ -1021,14 +1021,14 @@ class handler :public Sql_alloc
uint
errkey
;
/* Last dup key */
uint
key_used_on_scan
;
uint
active_index
;
/* Length of ref (1-8 or the clustered key length) */
/*
*
Length of ref (1-8 or the clustered key length) */
uint
ref_length
;
FT_INFO
*
ft_handler
;
enum
{
NONE
=
0
,
INDEX
,
RND
}
inited
;
bool
locked
;
bool
implicit_emptied
;
/* Can be !=0 only if HEAP */
const
COND
*
pushed_cond
;
/*
/*
*
next_insert_id is the next value which should be inserted into the
auto_increment column: in a inserting-multi-row statement (like INSERT
SELECT), for the first row where the autoinc value is not specified by the
...
...
@@ -1038,14 +1038,14 @@ class handler :public Sql_alloc
get_auto_increment().
*/
ulonglong
next_insert_id
;
/*
/*
*
insert id for the current row (*autogenerated*; if not
autogenerated, it's 0).
At first successful insertion, this variable is stored into
THD::first_successful_insert_id_in_cur_stmt.
*/
ulonglong
insert_id_for_cur_row
;
/*
/*
*
Interval returned by get_auto_increment() and being consumed by the
inserter.
*/
...
...
@@ -1066,7 +1066,7 @@ class handler :public Sql_alloc
/* TODO: DBUG_ASSERT(inited == NONE); */
}
virtual
handler
*
clone
(
MEM_ROOT
*
mem_root
);
/* This is called after create to allow us to set up cached variables */
/*
*
This is called after create to allow us to set up cached variables */
void
init
()
{
cached_table_flags
=
table_flags
();
...
...
@@ -1092,7 +1092,7 @@ class handler :public Sql_alloc
{
return
(
ha_table_flags
()
&
HA_NO_TRANSACTIONS
)
==
0
;
}
virtual
uint
extra_rec_buf_length
()
const
{
return
0
;
}
/*
/*
*
This method is used to analyse the error to see whether the error
is ignorable or not, certain handlers can have more error that are
ignorable than others. E.g. the partition handler can get inserts
...
...
@@ -1112,12 +1112,12 @@ class handler :public Sql_alloc
return
TRUE
;
}
/*
/*
*
Number of rows in table. It will only be called if
(table_flags() & (HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT)) != 0
*/
virtual
ha_rows
records
()
{
return
stats
.
records
;
}
/*
/*
*
Return upper bound of current number of records in the table
(max. of how many records one will retrieve when doing a full table scan)
If upper bound is not known, HA_POS_ERROR should be returned as a max
...
...
@@ -1126,7 +1126,7 @@ class handler :public Sql_alloc
virtual
ha_rows
estimate_rows_upper_bound
()
{
return
stats
.
records
+
EXTRA_RECORDS
;
}
/*
/*
*
Get the row type from the storage engine. If this method returns
ROW_TYPE_NOT_USED, the information in HA_CREATE_INFO should be used.
*/
...
...
@@ -1174,7 +1174,7 @@ class handler :public Sql_alloc
}
Table_flags
ha_table_flags
()
const
{
return
cached_table_flags
;
}
/*
/*
*
Signal that the table->read_set and table->write_set table maps changed
The handler is allowed to set additional bits in the above map in this
call. Normally the handler should ignore all calls until we have done
...
...
@@ -1186,7 +1186,7 @@ class handler :public Sql_alloc
virtual
int
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
=
0
;
virtual
int
close
(
void
)
=
0
;
/*
/*
*
These functions represent the public interface to *users* of the
handler class, hence they are *not* virtual. For the inheritance
interface, see the (private) functions write_row(), update_row(),
...
...
@@ -1197,36 +1197,28 @@ class handler :public Sql_alloc
int
ha_update_row
(
const
uchar
*
old_data
,
uchar
*
new_data
);
int
ha_delete_row
(
const
uchar
*
buf
);
/*
SYNOPSIS
start_bulk_update()
RETURN
0 Bulk update used by handler
1 Bulk update not used, normal operation used
/**
@retval 0 Bulk update used by handler
@retval 1 Bulk update not used, normal operation used
*/
virtual
bool
start_bulk_update
()
{
return
1
;
}
/*
SYNOPSIS
start_bulk_delete()
RETURN
0 Bulk delete used by handler
1 Bulk delete not used, normal operation used
/**
@retval 0 Bulk delete used by handler
@retval 1 Bulk delete not used, normal operation used
*/
virtual
bool
start_bulk_delete
()
{
return
1
;
}
/*
SYNOPSIS
/**
This method is similar to update_row, however the handler doesn't need
to execute the updates at this point in time. The handler can be certain
that another call to bulk_update_row will occur OR a call to
exec_bulk_update before the set of updates in this query is concluded.
bulk_update_row()
old_data Old record
new_data New record
dup_key_found Number of duplicate keys found
RETURN
0 Bulk delete used by handler
1 Bulk delete not used, normal operation used
@param old_data Old record
@param new_data New record
@param dup_key_found Number of duplicate keys found
@retval 0 Bulk delete used by handler
@retval 1 Bulk delete not used, normal operation used
*/
virtual
int
bulk_update_row
(
const
uchar
*
old_data
,
uchar
*
new_data
,
uint
*
dup_key_found
)
...
...
@@ -1234,53 +1226,43 @@ class handler :public Sql_alloc
DBUG_ASSERT
(
FALSE
);
return
HA_ERR_WRONG_COMMAND
;
}
/*
SYNOPSIS
/**
After this call all outstanding updates must be performed. The number
of duplicate key errors are reported in the duplicate key parameter.
It is allowed to continue to the batched update after this call, the
handler has to wait until end_bulk_update with changing state.
exec_bulk_update()
dup_key_found Number of duplicate keys found
RETURN
0 Success
>0 Error code
@param dup_key_found Number of duplicate keys found
@retval 0 Success
@retval >0 Error code
*/
virtual
int
exec_bulk_update
(
uint
*
dup_key_found
)
{
DBUG_ASSERT
(
FALSE
);
return
HA_ERR_WRONG_COMMAND
;
}
/*
SYNOPSIS
/**
Perform any needed clean-up, no outstanding updates are there at the
moment.
end_bulk_update()
RETURN
Nothing
*/
virtual
void
end_bulk_update
()
{
return
;
}
/*
SYNOPSIS
/**
Execute all outstanding deletes and close down the bulk delete.
end_bulk_delete()
RETURN
0 Success
>0 Error code
@retval 0 Success
@retval >0 Error code
*/
virtual
int
end_bulk_delete
()
{
DBUG_ASSERT
(
FALSE
);
return
HA_ERR_WRONG_COMMAND
;
}
private:
private:
virtual
int
index_read
(
uchar
*
buf
,
const
uchar
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
)
{
return
HA_ERR_WRONG_COMMAND
;
}
public:
public:
/**
@brief
Positions an index cursor to the index specified in the handle. Fetches the
...
...
@@ -1315,7 +1297,7 @@ class handler :public Sql_alloc
private:
virtual
int
index_read_last
(
uchar
*
buf
,
const
uchar
*
key
,
uint
key_len
)
{
return
(
my_errno
=
HA_ERR_WRONG_COMMAND
);
}
public:
public:
/**
@brief
The following functions works like index_read, but it find the last
...
...
@@ -1343,11 +1325,11 @@ class handler :public Sql_alloc
virtual
int
ft_read
(
uchar
*
buf
)
{
return
HA_ERR_WRONG_COMMAND
;
}
virtual
int
rnd_next
(
uchar
*
buf
)
=
0
;
virtual
int
rnd_pos
(
uchar
*
buf
,
uchar
*
pos
)
=
0
;
/*
o
ne has to use this method when to find
/*
*
O
ne has to use this method when to find
random position by record as the plain
position() call doesn't work for some
handlers for random position
handlers for random position
.
*/
virtual
int
rnd_pos_by_record
(
uchar
*
record
)
{
...
...
@@ -1355,9 +1337,9 @@ class handler :public Sql_alloc
return
rnd_pos
(
record
,
ref
);
}
virtual
int
read_first_row
(
uchar
*
buf
,
uint
primary_key
);
/*
/*
*
The following function is only needed for tables that may be temporary
tables during joins
tables during joins
.
*/
virtual
int
restart_rnd_next
(
uchar
*
buf
,
uchar
*
pos
)
{
return
HA_ERR_WRONG_COMMAND
;
}
...
...
@@ -1374,13 +1356,13 @@ class handler :public Sql_alloc
virtual
int
extra_opt
(
enum
ha_extra_function
operation
,
ulong
cache_size
)
{
return
extra
(
operation
);
}
/*
Reset state of file to after 'open'
/*
*
Reset state of file to after 'open'
.
This function is called after every statement for all tables used
by that statement.
*/
virtual
int
reset
()
{
return
0
;
}
/*
/*
*
In an UPDATE or DELETE, if the row under the cursor was locked by another
transaction, and the engine used an optimistic read of the last
committed row value under the cursor, then the engine returns 1 from this
...
...
@@ -1393,7 +1375,7 @@ class handler :public Sql_alloc
engine that the next read will be a locking re-read of the row.
*/
virtual
bool
was_semi_consistent_read
()
{
return
0
;
}
/*
/*
*
Tell the engine whether it should avoid unnecessary lock waits.
If yes, in an UPDATE or DELETE, if the row under the cursor was locked
by another transaction, the engine may try an optimistic read of
...
...
@@ -1402,7 +1384,7 @@ class handler :public Sql_alloc
virtual
void
try_semi_consistent_read
(
bool
)
{}
virtual
void
unlock_row
()
{}
virtual
int
start_stmt
(
THD
*
thd
,
thr_lock_type
lock_type
)
{
return
0
;}
/*
/*
*
This is called to delete all rows in a table
If the handler don't support this, then this function will
return HA_ERR_WRONG_COMMAND and MySQL will delete the rows one
...
...
@@ -1438,7 +1420,7 @@ class handler :public Sql_alloc
next_insert_id
=
(
prev_insert_id
>
0
)
?
prev_insert_id
:
insert_id_for_cur_row
;
}
/*
/*
*
Reset the auto-increment counter to the given value, i.e. the next row
inserted will get the given value. This is called e.g. after TRUNCATE
is emulated by doing a 'DELETE FROM t'. HA_ERR_WRONG_COMMAND is
...
...
@@ -1451,27 +1433,27 @@ class handler :public Sql_alloc
protected:
/* to be implemented in handlers */
/* admin commands - called from mysql_admin_table */
/*
*
admin commands - called from mysql_admin_table */
virtual
int
check
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
)
{
return
HA_ADMIN_NOT_IMPLEMENTED
;
}
/*
i
n these two methods check_opt can be modified
/*
*
I
n these two methods check_opt can be modified
to specify CHECK option to use to call check()
upon the table
upon the table
.
*/
virtual
int
check_for_upgrade
(
HA_CHECK_OPT
*
check_opt
)
{
return
0
;
}
public:
int
ha_check_for_upgrade
(
HA_CHECK_OPT
*
check_opt
);
int
check_old_types
();
/* to be actually called to get 'check()' functionality*/
/*
*
to be actually called to get 'check()' functionality*/
int
ha_check
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
virtual
int
backup
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
)
{
return
HA_ADMIN_NOT_IMPLEMENTED
;
}
/*
r
estore assumes .frm file must exist, and that generate_table() has been
/*
*
R
estore assumes .frm file must exist, and that generate_table() has been
called; It will just copy the data file and run repair.
*/
virtual
int
restore
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
)
...
...
@@ -1512,17 +1494,15 @@ class handler :public Sql_alloc
virtual
char
*
update_table_comment
(
const
char
*
comment
)
{
return
(
char
*
)
comment
;}
virtual
void
append_create_info
(
String
*
packet
)
{}
/*
SYNOPSIS
is_fk_defined_on_table_or_index()
index Index to check if foreign key uses it
RETURN VALUE
TRUE Foreign key defined on table or index
FALSE No foreign key defined
DESCRIPTION
If index == MAX_KEY then a check for table is made and if index <
MAX_KEY then a check is made if the table has foreign keys and if
a foreign key uses this index (and thus the index cannot be dropped).
/**
If index == MAX_KEY then a check for table is made and if index <
MAX_KEY then a check is made if the table has foreign keys and if
a foreign key uses this index (and thus the index cannot be dropped).
@param index Index to check if foreign key uses it
@retval TRUE Foreign key defined on table or index
@retval FALSE No foreign key defined
*/
virtual
bool
is_fk_defined_on_table_or_index
(
uint
index
)
{
return
FALSE
;
}
...
...
@@ -1530,18 +1510,18 @@ class handler :public Sql_alloc
{
return
(
NULL
);}
/* gets foreign key create string from InnoDB */
virtual
char
*
get_tablespace_name
(
THD
*
thd
,
char
*
name
,
uint
name_len
)
{
return
(
NULL
);}
/* gets tablespace name from handler */
/* used in ALTER TABLE; 1 if changing storage engine is allowed */
/*
*
used in ALTER TABLE; 1 if changing storage engine is allowed */
virtual
bool
can_switch_engines
()
{
return
1
;
}
/* used in REPLACE; is > 0 if table is referred by a FOREIGN KEY */
/*
*
used in REPLACE; is > 0 if table is referred by a FOREIGN KEY */
virtual
int
get_foreign_key_list
(
THD
*
thd
,
List
<
FOREIGN_KEY_INFO
>
*
f_key_list
)
{
return
0
;
}
virtual
uint
referenced_by_foreign_key
()
{
return
0
;}
virtual
void
init_table_handle_for_HANDLER
()
{
return
;
}
/* prepare InnoDB for HANDLER */
virtual
void
free_foreign_key_create_info
(
char
*
str
)
{}
/* The following can be called without an open handler */
/*
*
The following can be called without an open handler */
virtual
const
char
*
table_type
()
const
=
0
;
/*
/*
*
If frm_error() is called then we will use this to find out what file
extentions exist for the storage engine. This is also used by the default
rename_table and delete_table method in handler.cc.
...
...
@@ -1598,14 +1578,14 @@ class handler :public Sql_alloc
virtual
bool
is_crashed
()
const
{
return
0
;
}
virtual
bool
auto_repair
()
const
{
return
0
;
}
/*
/*
*
default rename_table() and delete_table() rename/delete files with a
given name and extensions from bas_ext()
*/
virtual
int
rename_table
(
const
char
*
from
,
const
char
*
to
);
virtual
int
delete_table
(
const
char
*
name
);
virtual
void
drop_table
(
const
char
*
name
);
virtual
int
create
(
const
char
*
name
,
TABLE
*
form
,
HA_CREATE_INFO
*
info
)
=
0
;
#define CHF_CREATE_FLAG 0
...
...
@@ -1658,7 +1638,7 @@ class handler :public Sql_alloc
THR_LOCK_DATA
**
to
,
enum
thr_lock_type
lock_type
)
=
0
;
/* Type of table for caching query */
/*
*
Type of table for caching query */
virtual
uint8
table_cache_type
()
{
return
HA_CACHE_TBL_NONTRANSACT
;
}
...
...
@@ -1704,56 +1684,54 @@ class handler :public Sql_alloc
/*
RETURN
true Primary key (if there is one) is clustered
key covering all fields
false
otherwise
@retval TRUE Primary key (if there is one) is clustered
key covering all fields
@retval FALSE
otherwise
*/
virtual
bool
primary_key_is_clustered
()
{
return
FALSE
;
}
virtual
int
cmp_ref
(
const
uchar
*
ref1
,
const
uchar
*
ref2
)
{
return
memcmp
(
ref1
,
ref2
,
ref_length
);
}
/*
Condition pushdown to storage engines
*/
/*
/*
*
Push condition down to the table handler.
SYNOPSIS
cond_push()
cond Condition to be pushed. The condition tree must not be
modified by the by the caller.
RETURN
@param cond Condition to be pushed. The condition tree must not be
modified by the by the caller.
@return
The 'remainder' condition that caller must use to filter out records.
NULL means the handler will not return rows that do not match the
passed condition.
NOTES
@note
The pushed conditions form a stack (from which one can remove the
last pushed condition using cond_pop).
The table handler filters out rows using (pushed_cond1 AND pushed_cond2
AND ... AND pushed_condN)
or less restrictive condition, depending on handler's capabilities.
handler->ha_reset() call empties the condition stack.
Calls to rnd_init/rnd_end, index_init/index_end etc do not affect the
condition stack.
*/
virtual
const
COND
*
cond_push
(
const
COND
*
cond
)
{
return
cond
;
};
/*
/*
*
Pop the top condition from the condition stack of the handler instance.
SYNOPSIS
cond_pop()
Pops the top if condition stack, if stack is not empty
Pops the top if condition stack, if stack is not empty.
*/
virtual
void
cond_pop
()
{
return
;
};
virtual
bool
check_if_incompatible_data
(
HA_CREATE_INFO
*
create_info
,
uint
table_changes
)
{
return
COMPATIBLE_DATA_NO
;
}
/* These are only called from sql_select for internal temporary tables */
/*
*
These are only called from sql_select for internal temporary tables */
virtual
int
write_row
(
uchar
*
buf
__attribute__
((
unused
)))
{
return
HA_ERR_WRONG_COMMAND
;
...
...
@@ -1769,7 +1747,7 @@ class handler :public Sql_alloc
{
return
HA_ERR_WRONG_COMMAND
;
}
/*
/*
*
use_hidden_primary_key() is called in case of an update/delete when
(table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
but we don't have a primary key
...
...
sql/mysqld.cc
View file @
cd7cfc2a
...
...
@@ -6797,12 +6797,19 @@ SHOW_VAR status_vars[]= {
{
"Bytes_received"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
bytes_received
),
SHOW_LONGLONG_STATUS
},
{
"Bytes_sent"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
bytes_sent
),
SHOW_LONGLONG_STATUS
},
{
"Com_admin_commands"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_other
),
SHOW_LONG_STATUS
},
{
"Com_assign_to_keycache"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ASSIGN_TO_KEYCACHE
]),
SHOW_LONG_STATUS
},
{
"Com_alter_db"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_DB
]),
SHOW_LONG_STATUS
},
{
"Com_alter_db_upgrade"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_DB_UPGRADE
]),
SHOW_LONG_STATUS
},
{
"Com_alter_event"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_EVENT
]),
SHOW_LONG_STATUS
},
{
"Com_alter_function"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_FUNCTION
]),
SHOW_LONG_STATUS
},
{
"Com_alter_procedure"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_PROCEDURE
]),
SHOW_LONG_STATUS
},
{
"Com_alter_server"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_SERVER
]),
SHOW_LONG_STATUS
},
{
"Com_alter_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_TABLE
]),
SHOW_LONG_STATUS
},
{
"Com_alter_table_space"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ALTER_TABLESPACE
]),
SHOW_LONG_STATUS
},
{
"Com_analyze"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ANALYZE
]),
SHOW_LONG_STATUS
},
{
"Com_backup_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_BACKUP_TABLE
]),
SHOW_LONG_STATUS
},
{
"Com_begin"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_BEGIN
]),
SHOW_LONG_STATUS
},
{
"Com_binlog_base64_event"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_BINLOG_BASE64_EVENT
]),
SHOW_LONG_STATUS
},
{
"Com_call_procedure"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CALL
]),
SHOW_LONG_STATUS
},
{
"Com_change_db"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CHANGE_DB
]),
SHOW_LONG_STATUS
},
{
"Com_change_master"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CHANGE_MASTER
]),
SHOW_LONG_STATUS
},
...
...
@@ -6813,8 +6820,13 @@ SHOW_VAR status_vars[]= {
{
"Com_create_event"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_EVENT
]),
SHOW_LONG_STATUS
},
{
"Com_create_function"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_FUNCTION
]),
SHOW_LONG_STATUS
},
{
"Com_create_index"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_INDEX
]),
SHOW_LONG_STATUS
},
{
"Com_create_procedure"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_PROCEDURE
]),
SHOW_LONG_STATUS
},
{
"Com_create_server"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_SERVER
]),
SHOW_LONG_STATUS
},
{
"Com_create_spfunction"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_SPFUNCTION
]),
SHOW_LONG_STATUS
},
{
"Com_create_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_TABLE
]),
SHOW_LONG_STATUS
},
{
"Com_create_trigger"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_TRIGGER
]),
SHOW_LONG_STATUS
},
{
"Com_create_user"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_USER
]),
SHOW_LONG_STATUS
},
{
"Com_create_view"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_CREATE_VIEW
]),
SHOW_LONG_STATUS
},
{
"Com_dealloc_sql"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DEALLOCATE_PREPARE
]),
SHOW_LONG_STATUS
},
{
"Com_delete"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DELETE
]),
SHOW_LONG_STATUS
},
{
"Com_delete_multi"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DELETE_MULTI
]),
SHOW_LONG_STATUS
},
...
...
@@ -6823,8 +6835,13 @@ SHOW_VAR status_vars[]= {
{
"Com_drop_event"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_EVENT
]),
SHOW_LONG_STATUS
},
{
"Com_drop_function"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_FUNCTION
]),
SHOW_LONG_STATUS
},
{
"Com_drop_index"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_INDEX
]),
SHOW_LONG_STATUS
},
{
"Com_drop_procedure"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_PROCEDURE
]),
SHOW_LONG_STATUS
},
{
"Com_drop_server"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_SERVER
]),
SHOW_LONG_STATUS
},
{
"Com_drop_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_TABLE
]),
SHOW_LONG_STATUS
},
{
"Com_drop_trigger"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_TRIGGER
]),
SHOW_LONG_STATUS
},
{
"Com_drop_user"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_USER
]),
SHOW_LONG_STATUS
},
{
"Com_drop_view"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_VIEW
]),
SHOW_LONG_STATUS
},
{
"Com_empty_query"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_EMPTY_QUERY
]),
SHOW_LONG_STATUS
},
{
"Com_execute_sql"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_EXECUTE
]),
SHOW_LONG_STATUS
},
{
"Com_flush"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_FLUSH
]),
SHOW_LONG_STATUS
},
{
"Com_grant"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_GRANT
]),
SHOW_LONG_STATUS
},
...
...
@@ -6834,6 +6851,7 @@ SHOW_VAR status_vars[]= {
{
"Com_help"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_HELP
]),
SHOW_LONG_STATUS
},
{
"Com_insert"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_INSERT
]),
SHOW_LONG_STATUS
},
{
"Com_insert_select"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_INSERT_SELECT
]),
SHOW_LONG_STATUS
},
{
"Com_install_plugin"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_INSTALL_PLUGIN
]),
SHOW_LONG_STATUS
},
{
"Com_kill"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_KILL
]),
SHOW_LONG_STATUS
},
{
"Com_load"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_LOAD
]),
SHOW_LONG_STATUS
},
{
"Com_load_master_data"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_LOAD_MASTER_DATA
]),
SHOW_LONG_STATUS
},
...
...
@@ -6844,7 +6862,9 @@ SHOW_VAR status_vars[]= {
{
"Com_prepare_sql"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_PREPARE
]),
SHOW_LONG_STATUS
},
{
"Com_purge"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_PURGE
]),
SHOW_LONG_STATUS
},
{
"Com_purge_before_date"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_PURGE_BEFORE
]),
SHOW_LONG_STATUS
},
{
"Com_release_savepoint"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_RELEASE_SAVEPOINT
]),
SHOW_LONG_STATUS
},
{
"Com_rename_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_RENAME_TABLE
]),
SHOW_LONG_STATUS
},
{
"Com_rename_user"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_RENAME_USER
]),
SHOW_LONG_STATUS
},
{
"Com_repair"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REPAIR
]),
SHOW_LONG_STATUS
},
{
"Com_replace"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REPLACE
]),
SHOW_LONG_STATUS
},
{
"Com_replace_select"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REPLACE_SELECT
]),
SHOW_LONG_STATUS
},
...
...
@@ -6853,17 +6873,23 @@ SHOW_VAR status_vars[]= {
{
"Com_revoke"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REVOKE
]),
SHOW_LONG_STATUS
},
{
"Com_revoke_all"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REVOKE_ALL
]),
SHOW_LONG_STATUS
},
{
"Com_rollback"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ROLLBACK
]),
SHOW_LONG_STATUS
},
{
"Com_rollback_to_save_point"
,(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ROLLBACK_TO_SAVEPOINT
]),
SHOW_LONG_STATUS
},
{
"Com_savepoint"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SAVEPOINT
]),
SHOW_LONG_STATUS
},
{
"Com_select"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SELECT
]),
SHOW_LONG_STATUS
},
{
"Com_set_option"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SET_OPTION
]),
SHOW_LONG_STATUS
},
{
"Com_show_authors"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_AUTHORS
]),
SHOW_LONG_STATUS
},
{
"Com_show_binlog_events"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_BINLOG_EVENTS
]),
SHOW_LONG_STATUS
},
{
"Com_show_binlogs"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_BINLOGS
]),
SHOW_LONG_STATUS
},
{
"Com_show_charsets"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CHARSETS
]),
SHOW_LONG_STATUS
},
{
"Com_show_collations"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_COLLATIONS
]),
SHOW_LONG_STATUS
},
{
"Com_show_column_types"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_COLUMN_TYPES
]),
SHOW_LONG_STATUS
},
{
"Com_show_contributors"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CONTRIBUTORS
]),
SHOW_LONG_STATUS
},
{
"Com_show_create_db"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CREATE_DB
]),
SHOW_LONG_STATUS
},
{
"Com_show_create_event"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CREATE_EVENT
]),
SHOW_LONG_STATUS
},
{
"Com_show_create_func"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CREATE_FUNC
]),
SHOW_LONG_STATUS
},
{
"Com_show_create_proc"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CREATE_PROC
]),
SHOW_LONG_STATUS
},
{
"Com_show_create_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CREATE
]),
SHOW_LONG_STATUS
},
{
"Com_show_create_trigger"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_CREATE_TRIGGER
]),
SHOW_LONG_STATUS
},
{
"Com_show_databases"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_DATABASES
]),
SHOW_LONG_STATUS
},
{
"Com_show_engine_logs"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_ENGINE_LOGS
]),
SHOW_LONG_STATUS
},
{
"Com_show_engine_mutex"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_ENGINE_MUTEX
]),
SHOW_LONG_STATUS
},
...
...
@@ -6871,6 +6897,7 @@ SHOW_VAR status_vars[]= {
{
"Com_show_events"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_EVENTS
]),
SHOW_LONG_STATUS
},
{
"Com_show_errors"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_ERRORS
]),
SHOW_LONG_STATUS
},
{
"Com_show_fields"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_FIELDS
]),
SHOW_LONG_STATUS
},
{
"Com_show_func_code"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_FUNC_CODE
]),
SHOW_LONG_STATUS
},
{
"Com_show_grants"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_GRANTS
]),
SHOW_LONG_STATUS
},
{
"Com_show_keys"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_KEYS
]),
SHOW_LONG_STATUS
},
{
"Com_show_master_status"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_MASTER_STAT
]),
SHOW_LONG_STATUS
},
...
...
@@ -6878,11 +6905,15 @@ SHOW_VAR status_vars[]= {
{
"Com_show_open_tables"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_OPEN_TABLES
]),
SHOW_LONG_STATUS
},
{
"Com_show_plugins"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_PLUGINS
]),
SHOW_LONG_STATUS
},
{
"Com_show_privileges"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_PRIVILEGES
]),
SHOW_LONG_STATUS
},
{
"Com_show_proc_code"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_PROC_CODE
]),
SHOW_LONG_STATUS
},
{
"Com_show_processlist"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_PROCESSLIST
]),
SHOW_LONG_STATUS
},
{
"Com_show_slave_hosts"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_SLAVE_HOSTS
]),
SHOW_LONG_STATUS
},
{
"Com_show_slave_status"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_SLAVE_STAT
]),
SHOW_LONG_STATUS
},
{
"Com_show_status"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_STATUS
]),
SHOW_LONG_STATUS
},
{
"Com_show_status_func"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_STATUS_FUNC
]),
SHOW_LONG_STATUS
},
{
"Com_show_status_proc"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_STATUS_PROC
]),
SHOW_LONG_STATUS
},
{
"Com_show_storage_engines"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_STORAGE_ENGINES
]),
SHOW_LONG_STATUS
},
{
"Com_show_table_status"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_TABLE_STATUS
]),
SHOW_LONG_STATUS
},
{
"Com_show_tables"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_TABLES
]),
SHOW_LONG_STATUS
},
{
"Com_show_triggers"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_TRIGGERS
]),
SHOW_LONG_STATUS
},
{
"Com_show_variables"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SHOW_VARIABLES
]),
SHOW_LONG_STATUS
},
...
...
@@ -6896,6 +6927,7 @@ SHOW_VAR status_vars[]= {
{
"Com_stmt_reset"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stmt_reset
),
SHOW_LONG_STATUS
},
{
"Com_stmt_send_long_data"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stmt_send_long_data
),
SHOW_LONG_STATUS
},
{
"Com_truncate"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_TRUNCATE
]),
SHOW_LONG_STATUS
},
{
"Com_uninstall_plugin"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_UNINSTALL_PLUGIN
]),
SHOW_LONG_STATUS
},
{
"Com_unlock_tables"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_UNLOCK_TABLES
]),
SHOW_LONG_STATUS
},
{
"Com_update"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_UPDATE
]),
SHOW_LONG_STATUS
},
{
"Com_update_multi"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_UPDATE_MULTI
]),
SHOW_LONG_STATUS
},
...
...
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