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
39442f09
Commit
39442f09
authored
Dec 29, 2008
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.0-bugteam->5.1-bugteam merge
parents
bcfa0ced
3b617acb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
mysql-test/r/status.result
mysql-test/r/status.result
+25
-0
mysql-test/t/status.test
mysql-test/t/status.test
+39
-0
sql/mysqld.cc
sql/mysqld.cc
+9
-0
No files found.
mysql-test/r/status.result
View file @
39442f09
...
@@ -209,4 +209,29 @@ ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table '
...
@@ -209,4 +209,29 @@ ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table '
drop database db37908;
drop database db37908;
drop procedure proc37908;
drop procedure proc37908;
drop function func37908;
drop function func37908;
DROP PROCEDURE IF EXISTS p1;
DROP FUNCTION IF EXISTS f1;
CREATE FUNCTION f1() RETURNS INTEGER
BEGIN
DECLARE foo INTEGER;
DECLARE bar INTEGER;
SET foo=1;
SET bar=2;
RETURN foo;
END $$
CREATE PROCEDURE p1()
BEGIN
SELECT 1;
END $$
SELECT f1();
f1()
1
CALL p1();
1
1
SELECT 9;
9
9
DROP PROCEDURE p1;
DROP FUNCTION f1;
set @@global.concurrent_insert= @old_concurrent_insert;
set @@global.concurrent_insert= @old_concurrent_insert;
mysql-test/t/status.test
View file @
39442f09
...
@@ -238,6 +238,8 @@ let $tmp_table2 = `show global status like 'Created_tmp_tables'`;
...
@@ -238,6 +238,8 @@ let $tmp_table2 = `show global status like 'Created_tmp_tables'`;
--
disable_query_log
--
disable_query_log
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
;
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
--
enable_query_log
disconnect
con1
;
connection
default
;
#
#
# Bug#30252 Com_create_function is not incremented.
# Bug#30252 Com_create_function is not incremented.
...
@@ -291,6 +293,43 @@ connection root;
...
@@ -291,6 +293,43 @@ connection root;
drop
database
db37908
;
drop
database
db37908
;
drop
procedure
proc37908
;
drop
procedure
proc37908
;
drop
function
func37908
;
drop
function
func37908
;
#
# Bug#41131 "Questions" fails to increment - ignores statements instead stored procs
#
connect
(
con1
,
localhost
,
root
,,);
connection
con1
;
--
disable_warnings
DROP
PROCEDURE
IF
EXISTS
p1
;
DROP
FUNCTION
IF
EXISTS
f1
;
--
enable_warnings
DELIMITER
$$
;
CREATE
FUNCTION
f1
()
RETURNS
INTEGER
BEGIN
DECLARE
foo
INTEGER
;
DECLARE
bar
INTEGER
;
SET
foo
=
1
;
SET
bar
=
2
;
RETURN
foo
;
END
$$
CREATE
PROCEDURE
p1
()
BEGIN
SELECT
1
;
END
$$
DELIMITER
;
$$
let
$org_queries
=
`SHOW STATUS LIKE 'Queries'`
;
SELECT
f1
();
CALL
p1
();
let
$new_queries
=
`SHOW STATUS LIKE 'Queries'`
;
--
disable_log
let
$diff
=
`SELECT SUBSTRING('$new_queries',9)-SUBSTRING('$org_queries',9)`
;
--
enable_log
eval
SELECT
$diff
;
disconnect
con1
;
connection
default
;
DROP
PROCEDURE
p1
;
DROP
FUNCTION
f1
;
# End of 5.1 tests
# End of 5.1 tests
# Restore global concurrent_insert value. Keep in the end of the test file.
# Restore global concurrent_insert value. Keep in the end of the test file.
...
...
sql/mysqld.cc
View file @
39442f09
...
@@ -6910,6 +6910,14 @@ The minimum value for this variable is 4096.",
...
@@ -6910,6 +6910,14 @@ The minimum value for this variable is 4096.",
};
};
static
int
show_queries
(
THD
*
thd
,
SHOW_VAR
*
var
,
char
*
buff
)
{
var
->
type
=
SHOW_LONGLONG
;
var
->
value
=
(
char
*
)
&
thd
->
query_id
;
return
0
;
}
static
int
show_net_compression
(
THD
*
thd
,
SHOW_VAR
*
var
,
char
*
buff
)
static
int
show_net_compression
(
THD
*
thd
,
SHOW_VAR
*
var
,
char
*
buff
)
{
{
var
->
type
=
SHOW_MY_BOOL
;
var
->
type
=
SHOW_MY_BOOL
;
...
@@ -7325,6 +7333,7 @@ SHOW_VAR status_vars[]= {
...
@@ -7325,6 +7333,7 @@ SHOW_VAR status_vars[]= {
{
"Qcache_queries_in_cache"
,
(
char
*
)
&
query_cache
.
queries_in_cache
,
SHOW_LONG_NOFLUSH
},
{
"Qcache_queries_in_cache"
,
(
char
*
)
&
query_cache
.
queries_in_cache
,
SHOW_LONG_NOFLUSH
},
{
"Qcache_total_blocks"
,
(
char
*
)
&
query_cache
.
total_blocks
,
SHOW_LONG_NOFLUSH
},
{
"Qcache_total_blocks"
,
(
char
*
)
&
query_cache
.
total_blocks
,
SHOW_LONG_NOFLUSH
},
#endif
/*HAVE_QUERY_CACHE*/
#endif
/*HAVE_QUERY_CACHE*/
{
"Queries"
,
(
char
*
)
&
show_queries
,
SHOW_FUNC
},
{
"Questions"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
questions
),
SHOW_LONG_STATUS
},
{
"Questions"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
questions
),
SHOW_LONG_STATUS
},
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
{
"Rpl_status"
,
(
char
*
)
&
show_rpl_status
,
SHOW_FUNC
},
{
"Rpl_status"
,
(
char
*
)
&
show_rpl_status
,
SHOW_FUNC
},
...
...
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