mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
a8aacf8764
BitKeeper/etc/logging_ok: auto-union VC++Files/innobase/innobase.dsp: Auto merged VC++Files/libmysql/libmysql.dsp: Auto merged acinclude.m4: Auto merged configure.in: Auto merged BitKeeper/deleted/.del-com0shm.c~6a16f0c3d81de1f: Auto merged BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql: Auto merged extra/replace.c: Auto merged include/my_sys.h: Auto merged innobase/btr/btr0btr.c: Auto merged innobase/btr/btr0cur.c: Auto merged innobase/btr/btr0pcur.c: Auto merged innobase/btr/btr0sea.c: Auto merged innobase/configure.in: Auto merged innobase/data/data0data.c: Auto merged innobase/dict/dict0boot.c: Auto merged innobase/dict/dict0crea.c: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/dict/dict0load.c: Auto merged innobase/dict/dict0mem.c: Auto merged innobase/ha/ha0ha.c: Auto merged innobase/ha/hash0hash.c: Auto merged innobase/include/btr0btr.ic: Auto merged innobase/include/data0type.ic: Auto merged innobase/include/dict0mem.h: Auto merged innobase/include/log0log.ic: Auto merged innobase/include/mach0data.ic: Auto merged innobase/include/mtr0log.h: Auto merged innobase/include/mtr0mtr.h: Auto merged innobase/include/os0file.h: Auto merged innobase/include/row0upd.ic: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/sync0sync.h: Auto merged innobase/include/trx0rseg.ic: Auto merged innobase/lock/lock0lock.c: Auto merged innobase/log/log0recv.c: Auto merged innobase/mem/mem0dbg.c: Auto merged innobase/mtr/mtr0log.c: Auto merged innobase/mtr/mtr0mtr.c: Auto merged innobase/os/os0file.c: Auto merged innobase/page/page0cur.c: Auto merged innobase/page/page0page.c: Auto merged innobase/pars/lexyy.c: Auto merged innobase/read/read0read.c: Auto merged innobase/rem/rem0cmp.c: Auto merged innobase/rem/rem0rec.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/row/row0purge.c: Auto merged innobase/row/row0sel.c: Auto merged innobase/row/row0undo.c: Auto merged innobase/row/row0upd.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/sync/sync0rw.c: Auto merged innobase/thr/thr0loc.c: Auto merged innobase/trx/trx0purge.c: Auto merged innobase/trx/trx0rec.c: Auto merged innobase/trx/trx0roll.c: Auto merged innobase/trx/trx0trx.c: Auto merged innobase/trx/trx0undo.c: Auto merged myisam/mi_check.c: Auto merged myisam/myisamchk.c: Auto merged mysql-test/r/multi_update.result: Auto merged mysql-test/r/mysqlbinlog.result: Auto merged mysql-test/r/rpl_error_ignored_table.result: Auto merged mysql-test/t/multi_update.test: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged mysys/mf_iocache.c: Auto merged mysys/mf_pack.c: Auto merged mysys/my_getopt.c: Auto merged sql/ha_berkeley.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/opt_range.cc: Auto merged sql/set_var.h: Auto merged sql/sql_cache.cc: Auto merged sql/sql_cache.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_handler.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_list.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged tests/thread_test.c: Auto merged client/mysqldump.c: Keep original indentation mysql-test/r/merge.result: keep old file scripts/mysql_fix_privilege_tables.sh: Keep old structure in merge with 4.0 sql/table.cc: merge with 4.0 + simple optimizations
135 lines
6.8 KiB
Text
135 lines
6.8 KiB
Text
select floor(5.5),floor(-5.5);
|
|
floor(5.5) floor(-5.5)
|
|
5 -6
|
|
explain extended select floor(5.5),floor(-5.5);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority floor(5.5) AS `floor(5.5)`,floor(-(5.5)) AS `floor(-5.5)`
|
|
select ceiling(5.5),ceiling(-5.5);
|
|
ceiling(5.5) ceiling(-5.5)
|
|
6 -5
|
|
explain extended select ceiling(5.5),ceiling(-5.5);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority ceiling(5.5) AS `ceiling(5.5)`,ceiling(-(5.5)) AS `ceiling(-5.5)`
|
|
select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2), truncate(-52.64,1),truncate(-52.64,-1);
|
|
truncate(52.64,1) truncate(52.64,2) truncate(52.64,-1) truncate(52.64,-2) truncate(-52.64,1) truncate(-52.64,-1)
|
|
52.6 52.64 50 0 -52.6 -50
|
|
explain extended select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2), truncate(-52.64,1),truncate(-52.64,-1);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority truncate(52.64,1) AS `truncate(52.64,1)`,truncate(52.64,2) AS `truncate(52.64,2)`,truncate(52.64,-(1)) AS `truncate(52.64,-1)`,truncate(52.64,-(2)) AS `truncate(52.64,-2)`,truncate(-(52.64),1) AS `truncate(-52.64,1)`,truncate(-(52.64),-(1)) AS `truncate(-52.64,-1)`
|
|
select round(5.5),round(-5.5);
|
|
round(5.5) round(-5.5)
|
|
6 -6
|
|
explain extended select round(5.5),round(-5.5);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority round(5.5,0) AS `round(5.5)`,round(-(5.5),0) AS `round(-5.5)`
|
|
select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2);
|
|
round(5.64,1) round(5.64,2) round(5.64,-1) round(5.64,-2)
|
|
5.6 5.64 10 0
|
|
select abs(-10), sign(-5), sign(5), sign(0);
|
|
abs(-10) sign(-5) sign(5) sign(0)
|
|
10 -1 1 0
|
|
explain extended select abs(-10), sign(-5), sign(5), sign(0);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority abs(-(10)) AS `abs(-10)`,sign(-(5)) AS `sign(-5)`,sign(5) AS `sign(5)`,sign(0) AS `sign(0)`
|
|
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
|
|
log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2)
|
|
10.000000 10.000000 NULL NULL NULL 2.000000 NULL NULL
|
|
explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority log(exp(10)) AS `log(exp(10))`,exp((log(sqrt(10)) * 2)) AS `exp(log(sqrt(10))*2)`,log(-(1)) AS `log(-1)`,log(NULL) AS `log(NULL)`,log(1,1) AS `log(1,1)`,log(3,9) AS `log(3,9)`,log(-(1),2) AS `log(-1,2)`,log(NULL,2) AS `log(NULL,2)`
|
|
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
|
|
ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL)
|
|
10.000000 10.000000 NULL NULL NULL
|
|
explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority 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)`
|
|
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
|
|
log2(8) log2(15) log2(-2) log2(0) log2(NULL)
|
|
3.000000 3.906891 NULL NULL NULL
|
|
explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority 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)`
|
|
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
|
|
log10(100) log10(18) log10(-4) log10(0) log10(NULL)
|
|
2.000000 1.255273 NULL NULL NULL
|
|
explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority log10(100) AS `log10(100)`,log10(18) AS `log10(18)`,log10(-(4)) AS `log10(-4)`,log10(0) AS `log10(0)`,log10(NULL) AS `log10(NULL)`
|
|
select pow(10,log10(10)),power(2,4);
|
|
pow(10,log10(10)) power(2,4)
|
|
10.000000 16.000000
|
|
explain extended select pow(10,log10(10)),power(2,4);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority pow(10,log10(10)) AS `pow(10,log10(10))`,pow(2,4) AS `power(2,4)`
|
|
set @@rand_seed1=10000000,@@rand_seed2=1000000;
|
|
select rand(999999),rand();
|
|
rand(999999) rand()
|
|
0.014231365187309 0.028870999839968
|
|
explain extended select rand(999999),rand();
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority no_cache rand(999999) AS `rand(999999)`,rand() AS `rand()`
|
|
select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1);
|
|
pi() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1)
|
|
3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398
|
|
explain extended select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority pi() AS `pi()`,sin((pi() / 2)) AS `sin(pi()/2)`,cos((pi() / 2)) AS `cos(pi()/2)`,abs(tan(pi())) AS `abs(tan(pi()))`,(1 / tan(1)) AS `cot(1)`,asin(1) AS `asin(1)`,acos(0) AS `acos(0)`,atan(1) AS `atan(1)`
|
|
select degrees(pi()),radians(360);
|
|
degrees(pi()) radians(360)
|
|
180 6.2831853071796
|
|
SELECT ACOS(1.0);
|
|
ACOS(1.0)
|
|
0.000000
|
|
SELECT ASIN(1.0);
|
|
ASIN(1.0)
|
|
1.570796
|
|
SELECT ACOS(0.2*5.0);
|
|
ACOS(0.2*5.0)
|
|
0.000000
|
|
SELECT ACOS(0.5*2.0);
|
|
ACOS(0.5*2.0)
|
|
0.000000
|
|
SELECT ASIN(0.8+0.2);
|
|
ASIN(0.8+0.2)
|
|
1.570796
|
|
SELECT ASIN(1.2-0.2);
|
|
ASIN(1.2-0.2)
|
|
1.570796
|
|
select floor(log(4)/log(2));
|
|
floor(log(4)/log(2))
|
|
2
|
|
select floor(log(8)/log(2));
|
|
floor(log(8)/log(2))
|
|
3
|
|
select floor(log(16)/log(2));
|
|
floor(log(16)/log(2))
|
|
4
|
|
explain extended select degrees(pi()),radians(360);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
|