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
a0a869e7
Commit
a0a869e7
authored
May 23, 2008
by
Chad MILLER
Browse files
Options
Browse Files
Download
Plain Diff
Merged from trunk.
parents
011274bc
680e3a80
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
343 additions
and
49 deletions
+343
-49
mysql-test/r/func_misc.result
mysql-test/r/func_misc.result
+62
-27
mysql-test/t/func_misc.test
mysql-test/t/func_misc.test
+281
-22
No files found.
mysql-test/r/func_misc.result
View file @
a0a869e7
...
...
@@ -104,41 +104,76 @@ t1 CREATE TABLE `t1` (
`length(uuid())` int(10) NOT NULL DEFAULT '0'
)
ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a timestamp default '2005-05-05 01:01:01',
create table t1 (id int,
a timestamp default '2005-05-05 01:01:01',
b timestamp default '2005-05-05 01:01:01');
insert into t1 set a = now();
insert into t1 set
id = 1,
a = now();
select sleep(3);
sleep(3)
0
update t1 set b = now();
select timediff(b, a) >= '00:00:03' from t1;
timediff(b, a) >= '00:00:03'
update t1 set b = now() where id = 1;
insert into t1 set id = 2,a = now();
select sleep(3);
sleep(3)
0
update t1 set b = now() where id = 2;
select count(*) >= 1 from t1
where timediff(b, a) between '00:00:03' and '00:00:07';
count(*) >= 1
1
drop table t1;
set global query_cache_size=1355776;
create table t1 (a int);
insert into t1 values (1),(1),(1);
create table t2 (a datetime default null, b datetime default null);
insert into t2 set a = now();
select a from t1 where sleep(1);
a
update t2 set b = now() where b is null;
insert into t2 set a = now();
select a from t1 where sleep(a);
a
update t2 set b = now() where b is null;
insert into t2 set a = now();
select a from t1 where sleep(1);
a
update t2 set b = now() where b is null;
select timediff(b, a) >= '00:00:03' from t2;
timediff(b, a) >= '00:00:03'
1
SET @@global.query_cache_size = 1024 * 64;
SELECT 1 as some_value, sleep(1);
some_value sleep(1)
1 0
SELECT <Qcache_queries_in_cache_before> = <Qcache_queries_in_cache_before>
AS "Was the query not cached (= expectation)?";
Was the query not cached (= expectation)?
1
DROP TEMPORARY TABLE IF EXISTS proclist_history;
DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE proclist_history AS
SELECT 'Bug 1' AS test, 0 AS attempt, NOW() AS observation_time, state, time
FROM information_schema.processlist WHERE 1 = 0;
CREATE TABLE t1 (f1 BIGINT);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
SET @sleep_time_per_result_row = 1;
----- establish connection con1 (user = root) -----
SET @sleep_time_per_result_row = 1;
Qcache_queries_in_cache: 0
#
Send query with send, pull server responses later
SELECT sleep(@sleep_time_per_result_row) FROM t1;
----- switch to connection default (user = root) -----
----- switch to connection con1 (user = root) -----
#
Pull server responses of last query
sleep(@sleep_time_per_result_row)
0
0
0
0
----- switch to connection con1 (user = root) -----
#
Send query with send, pull server responses later
SELECT sleep(@sleep_time_per_result_row) FROM t1;
----- switch to connection default (user = root) -----
SELECT COUNT(*) FROM information_schema.processlist
WHERE info = 'SELECT sleep(@sleep_time_per_result_row) FROM t1'
AND state = 'User sleep';
COUNT(*)
1
drop table t2;
drop table t1;
set global query_cache_size=default;
----- switch to connection con1 (user = root) -----
#
Pull server responses of last query
sleep(@sleep_time_per_result_row)
0
0
0
0
----- switch to connection default and close connection con1 -----
SET @@global.query_cache_size = default;
DROP TABLE t1;
DROP TEMPORARY TABLE proclist_history;
create table t1 select INET_ATON('255.255.0.1') as `a`;
show create table t1;
Table Create Table
...
...
mysql-test/t/func_misc.test
View file @
a0a869e7
This diff is collapsed.
Click to expand it.
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