~mathiaz/ubuntu/lucid/mysql-dfsg-5.1/zap-bug-552053

« back to all changes in this revision

Viewing changes to mysql-test/r/func_math.result

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-06-25 12:55:45 UTC
  • mfrom: (1.1.2 upstream) (0.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20090625125545-m8ogs96zzsri74xe
Tags: 5.1.34-1ubuntu1
* Merge from debian experimental (and 5.0 from main), remaining changes:
  - debian/mysql-server-5.1.config:
    + ask for MySQL root password at priority high instead of medium so
      that the password prompt is seen on a default install. (LP: #319843)
    + don't ask for root password when upgrading from a 5.0 install.
  - debian/control:
    + Make libmysqlclient16-dev a transitional package depending on
      libmysqlclient-dev.
    + Make libmysqlclient-dev conflict with libmysqlclient15-dev.
    + Don't build mysql-server, mysql-client, mysql-common and
      libmysqlclient15-dev binary packages since they're still provided
      by mysql-dfsg-5.0.
    + Make mysql-{client,server}-5.1 packages conflict and
      replace mysql-{client,server}-5.0, but not provide
      mysql-{client,server}.
    + Depend on a specific version of mysql-common rather than the src
      version of mysql-dfsg-5.1 since mysql-common is currently part of
      mysql-dfsg-5.0.
    + Lower mailx from a Recommends to a Suggests to avoid pulling in
      a full MTA on all installs of mysql-server. (LP: #259477)
  - debian/rules:
    + added -fno-strict-aliasing to CFLAGS to get around mysql testsuite
      build failures.
    + install mysql-test and sql-bench to /usr/share/mysql/ rather than
      /usr/.
  - debian/additions/debian-start.inc.sh: support ANSI mode (LP: #310211)
  - Add AppArmor profile:
    - debian/apparmor-profile: apparmor profile.
    - debian/rules, debian/mysql-server-5.0.files: install apparmor profile.
    - debian/mysql-server-5.0.dirs: add etc/apparmor.d/force-complain
    - debian/mysql-server-5.0.postrm: remove symlink in force-complain/ on
      purge.
    - debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    - debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    - debian/mysql-server-5.1.postinst: reload apparmor profiles.
  - debian/additions/my.cnf: remove language option. Error message files are
    located in a different directory in MySQL 5.0. Setting the language
    option to use /usr/share/mysql/english breaks 5.0. Both 5.0 and 5.1
    use a default value that works. (LP: #316974)
  - debian/mysql-server-5.1.mysql.init:
    + Clearly indicate that we do not support running multiple instances
      of mysqld by duplicating the init script.
      (closes: #314785, #324834, #435165, #444216)
    + Properly parameterize all existing references to the mysql config
      file (/etc/mysql/my.cnf).
  - debian/mysql-server-5.0.postinst: Clear out the second password
    when setting up mysql. (LP: #344816)
  - mysql-server-core-5.1 package for files needed by Akonadi:
    + debian/control: create mysql-server-core-5.1 package.
    + debian/mysql-server-core-5.1.files, debian/mysql-server-5.1.files:
      move core mysqld files to mysql-server-core-5.1 package.
  - Don't package sql-bench and mysql-test file.
* Dropped changes:
  - debian/patches/92_ssl_test_cert.dpatch: certificate expiration in
    test suite (LP: #323755). Included upstream.
* Dropped from 5.0:
  - apparmor profile:
    - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6. All version
      of apparmor-profile (>hardy) are higher than this version.
    - debian/mysql-server-5.0.preinst: create symlink for force-complain/
      on pre-feisty upgrades, upgrades where apparmor-profiles profile is
      unchanged (ie non-enforcing) and upgrades where the profile
      doesn't exist. Support for pre-hardy upgrades is no longer needed.
* debian/mysql-server-5.1.postinst: fix debian-sys-maint user creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
Note    1003    select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)`
61
61
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
62
62
log2(8) log2(15)        log2(-2)        log2(0) log2(NULL)
63
 
3       3.9068905956085 NULL    NULL    NULL
 
63
3       3.90689059560852        NULL    NULL    NULL
64
64
explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
65
65
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
66
66
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
68
68
Note    1003    select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)`
69
69
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
70
70
log10(100)      log10(18)       log10(-4)       log10(0)        log10(NULL)
71
 
2       1.2552725051033 NULL    NULL    NULL
 
71
2       1.25527250510331        NULL    NULL    NULL
72
72
explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
73
73
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
74
74
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
85
85
set @@rand_seed1=10000000,@@rand_seed2=1000000;
86
86
select rand(999999),rand();
87
87
rand(999999)    rand()
88
 
0.014231365187309       0.028870999839968
 
88
0.0142313651873091      0.028870999839968
89
89
explain extended select rand(999999),rand();
90
90
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
91
91
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
101
101
Note    1003    select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)`
102
102
select degrees(pi()),radians(360);
103
103
degrees(pi())   radians(360)
104
 
180     6.2831853071796
 
104
180     6.28318530717959
105
105
select format(atan(-2, 2), 6);
106
106
format(atan(-2, 2), 6)
107
107
-0.785398
368
368
5       5       1
369
369
select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5);
370
370
pow(cast(-2 as unsigned), 5)    pow(18446744073709551614, 5)    pow(-2, 5)
371
 
2.1359870359209e+96     2.1359870359209e+96     -32
 
371
2.13598703592091e+96    2.13598703592091e+96    -32
372
372
CREATE TABLE t1 (a timestamp, b varchar(20), c bit(1));
373
373
INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0);
374
374
SELECT a DIV 900 y FROM t1 GROUP BY y;
407
407
a DIV 2
408
408
0
409
409
DROP TABLE t1;
 
410
CREATE TABLE t1 (a DOUBLE);
 
411
INSERT INTO t1 VALUES (-1.1), (1.1),
 
412
(-1.5), (1.5),
 
413
(-1.9), (1.9),
 
414
(-2.1), (2.1),
 
415
(-2.5), (2.5),
 
416
(-2.9), (2.9),
 
417
# Check numbers with absolute values > 2^53 - 1 
 
418
# (see comments for MAX_EXACT_INTEGER)
 
419
(-1e16 - 0.5), (1e16 + 0.5),
 
420
(-1e16 - 1.5), (1e16 + 1.5);
 
421
SELECT a, ROUND(a) FROM t1;
 
422
a       ROUND(a)
 
423
-1.1    -1
 
424
1.1     1
 
425
-1.5    -2
 
426
1.5     2
 
427
-1.9    -2
 
428
1.9     2
 
429
-2.1    -2
 
430
2.1     2
 
431
-2.5    -2
 
432
2.5     2
 
433
-2.9    -3
 
434
2.9     3
 
435
-1e+16  -10000000000000000
 
436
1e+16   10000000000000000
 
437
-1e+16  -10000000000000002
 
438
1e+16   10000000000000002
 
439
DROP TABLE t1;
410
440
End of 5.0 tests
411
441
SELECT 1e308 + 1e308;
412
442
1e308 + 1e308