summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/bigint.result16
-rw-r--r--mysql-test/r/case.result20
-rw-r--r--mysql-test/r/count_distinct3.result1
-rw-r--r--mysql-test/r/date_formats.result8
-rw-r--r--mysql-test/r/rpl_change_master.result32
-rw-r--r--mysql-test/r/rpl_loaddata.result2
-rw-r--r--mysql-test/r/symlink.result4
-rw-r--r--mysql-test/r/user_var.result19
8 files changed, 85 insertions, 17 deletions
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index 93214ae8479..4c6e1645451 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -18,9 +18,11 @@ select -(0-3),round(-(0-3)), round(9999999999999999999);
-(0-3) round(-(0-3)) round(9999999999999999999)
3 3 10000000000000000000
create table t1 (a bigint unsigned not null, primary key(a));
-insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE);
+insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
select * from t1;
a
+18446744073709551612
+18446744073709551613
18446744073709551614
18446744073709551615
select * from t1 where a=18446744073709551615;
@@ -29,6 +31,8 @@ a
delete from t1 where a=18446744073709551615;
select * from t1;
a
+18446744073709551612
+18446744073709551613
18446744073709551614
drop table t1;
create table t1 ( a int not null default 1, big bigint );
@@ -70,3 +74,13 @@ select * from t1 limit 9999999999;
id a
9999999999 1
drop table t1;
+CREATE TABLE t1 ( quantity decimal(60,0));
+insert into t1 values (10000000000000000000);
+insert into t1 values (10000000000000000000.0);
+insert into t1 values ('10000000000000000000');
+select * from t1;
+quantity
+-8446744073709551616
+10000000000000000000
+10000000000000000000
+drop table t1;
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result
index 9b03422f54c..e9d432de077 100644
--- a/mysql-test/r/case.result
+++ b/mysql-test/r/case.result
@@ -90,19 +90,21 @@ CASE WHEN 1 THEN 1 ELSE 'a' END AS c4,
CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5,
CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6,
CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7,
-CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8
+CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8,
+CASE WHEN 1 THEN 1.0 END AS c9
;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` char(1) character set latin1 collate latin1_danish_ci default NULL,
- `c2` char(1) character set latin1 collate latin1_danish_ci default NULL,
- `c3` char(1) default NULL,
- `c4` char(1) default NULL,
- `c5` char(3) default NULL,
- `c6` char(3) default NULL,
- `c7` double(3,1) default NULL,
- `c8` double(3,1) default NULL
+ `c1` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
+ `c2` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
+ `c3` char(1) NOT NULL default '',
+ `c4` char(1) NOT NULL default '',
+ `c5` char(3) NOT NULL default '',
+ `c6` char(3) NOT NULL default '',
+ `c7` double(3,1) NOT NULL default '0.0',
+ `c8` double(3,1) NOT NULL default '0.0',
+ `c9` double(3,1) default NULL
) TYPE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT CASE
diff --git a/mysql-test/r/count_distinct3.result b/mysql-test/r/count_distinct3.result
index 633bb2fa252..086e1360b0c 100644
--- a/mysql-test/r/count_distinct3.result
+++ b/mysql-test/r/count_distinct3.result
@@ -5,3 +5,4 @@ COUNT(*)
4181000
SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
DROP TABLE t1;
+set @@read_buffer_size=default;
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result
index 346d086f34c..5eb21c40a3e 100644
--- a/mysql-test/r/date_formats.result
+++ b/mysql-test/r/date_formats.result
@@ -120,7 +120,7 @@ date format str_to_date
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.000044
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
15 September 2001 %d %M %Y 2001-09-15 00:00:00
-15 SEPTEMB 2001 %d %M %Y 2001-01-15 00:00:00
+15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
15 MAY 2001 %d %b %Y 2001-05-15 00:00:00
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
@@ -144,7 +144,7 @@ date format con
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.000044
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
15 September 2001 %d %M %Y 2001-09-15 00:00:00
-15 SEPTEMB 2001 %d %M %Y 2001-01-15 00:00:00
+15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
15 MAY 2001 %d %b %Y 2001-05-15 00:00:00
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
@@ -168,7 +168,7 @@ date format datetime
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.000044
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
15 September 2001 %d %M %Y 2001-09-15 00:00:00
-15 SEPTEMB 2001 %d %M %Y 2001-01-15 00:00:00
+15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
15 MAY 2001 %d %b %Y 2001-05-15 00:00:00
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00
@@ -192,7 +192,7 @@ date format date2
10:20:10.44AM %h:%i:%s.%f%p 0000-00-00
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15
15 September 2001 %d %M %Y 2001-09-15
-15 SEPTEMB 2001 %d %M %Y 2001-01-15
+15 SEPTEMB 2001 %d %M %Y 2001-09-15
15 MAY 2001 %d %b %Y 2001-05-15
Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15
Sund 15 MAY 2001 %W %d %b %Y 2001-05-15
diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result
new file mode 100644
index 00000000000..883cb65171c
--- /dev/null
+++ b/mysql-test/r/rpl_change_master.result
@@ -0,0 +1,32 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+select get_lock("a",5);
+get_lock("a",5)
+1
+create table t1(n int);
+insert into t1 values(1+get_lock("a",10)*0);
+insert into t1 values(2);
+stop slave;
+select * from t1;
+n
+1
+show slave status;
+Slave_IO_State Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master
+# 127.0.0.1 root 9306 1 master-bin.000001 273 slave-relay-bin.000002 258 master-bin.000001 No No 0 0 214 317 None 0 No #
+change master to master_user='root';
+show slave status;
+Slave_IO_State Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master
+# 127.0.0.1 root 9306 1 master-bin.000001 214 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 214 4 None 0 No #
+select release_lock("a");
+release_lock("a")
+1
+start slave;
+select * from t1;
+n
+1
+2
+drop table t1;
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index 80e40924a55..65fc9d1b415 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -43,7 +43,7 @@ change master to master_user='test';
change master to master_user='root';
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1442 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1442 4 None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1419 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1419 4 None 0 No #
set global sql_slave_skip_counter=1;
start slave;
set sql_log_bin=0;
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index c31d1019d89..a56fe3e1462 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -40,7 +40,7 @@ t9 CREATE TABLE `t9` (
`b` char(16) NOT NULL default '',
`c` int(11) NOT NULL default '0',
PRIMARY KEY (`a`)
-) TYPE=MyISAM CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
+) TYPE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
alter table t9 rename t8, add column d int not null;
alter table t8 rename t7;
rename table t7 to t9;
@@ -62,5 +62,5 @@ t9 CREATE TABLE `t9` (
`c` int(11) NOT NULL default '0',
`d` int(11) NOT NULL default '0',
PRIMARY KEY (`a`)
-) TYPE=MyISAM CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
+) TYPE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
drop database mysqltest;
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 612c1f53bcf..fc3dc4eddcd 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -101,3 +101,22 @@ drop table t1;
select @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b, @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b;
@a:=10 @b:=2 @a>@b @a:="10" @b:="2" @a>@b @a:=10 @b:=2 @a>@b @a:="10" @b:="2" @a>@b
10 2 1 10 2 1 10 2 1 10 2 1
+create table t1 (i int not null);
+insert t1 values (1),(2),(2),(3),(3),(3);
+select @a:=0;
+@a:=0
+0
+select @a, @a:=@a+count(*), count(*), @a from t1 group by i;
+@a @a:=@a+count(*) count(*) @a
+0 1 1 0
+0 2 2 0
+0 3 3 0
+select @a:=0;
+@a:=0
+0
+select @a+0, @a:=@a+0+count(*), count(*), @a+0 from t1 group by i;
+@a+0 @a:=@a+0+count(*) count(*) @a+0
+0 1 1 0
+1 3 2 0
+3 6 3 0
+drop table t1;