~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/bench_count_distinct.test

  • Committer: Jay Pipes
  • Date: 2009-01-30 04:01:12 UTC
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090130040112-svbn774guj98pwi4
To remain in compatibility with MySQL, added ability to interpret
decimal arguments as datetime strings for temporal functions.

Fixed YEAR(), MONTH(), DAYOFMONTH(), DAYOFYEAR(), HOUR(), MINUTE(), SECOND(), and MICROSECOND()
to accept decimal parameters and interpret them the same way as MySQL.

Fixed an issue with the TemporalFormat::matches() method which was 
incorrectly assuming all microsecond arguments were specified as 6 digits.
Added power of 10 multiplier to usecond calculation. This fixes issues with
failures in type_date and func_sapdb test cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
--disable_warnings
6
6
drop table if exists t1;
7
7
--enable_warnings
8
 
create table t1(n int not null, key(n));
 
8
create table t1(n int not null, key(n)) delay_key_write = 1;
9
9
let $1=100;
10
10
disable_query_log;
11
 
begin;
12
11
while ($1)
13
12
{
14
13
 eval insert into t1 values($1);
15
14
 eval insert into t1 values($1);
16
15
 dec $1;
17
16
}
18
 
commit;
19
17
enable_query_log;
20
18
select count(distinct n) from t1;
21
19
explain extended select count(distinct n) from t1;