Skip to content

Commit 8c31c4d

Browse files
Alexey KopytovAlexey Kopytov
authored andcommitted
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
2 parents b3e01b6 + ae12a72 commit 8c31c4d

73 files changed

Lines changed: 1348 additions & 441 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

mysql-test/extra/rpl_tests/rpl_loaddata.test

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,19 @@ connect (conn2,localhost,root,,*NO-ONE*);
219219
-- echo ### assertion: works without stating the default database
220220
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
221221
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
222+
223+
# We cannot disconnect right away because when inserting
224+
# concurrently in a MyISAM table, the server is sending an OK
225+
# to the client before updating the table state (where the
226+
# number of records is kept). See: BUG#37521 and BUG#29334.
227+
# So we need to wait, otherwise we would be having sporadic
228+
# failures as reported here: BUG#50451.
229+
230+
# 12 = 3 rows per each LOAD DATA executed x 4
231+
-- let $count= 12
232+
-- let $table= $db1.t1
233+
--source include/wait_until_rows_count.inc
234+
222235
-- echo ### disconnect and switch back to master connection
223236
-- disconnect conn2
224237
-- connection master
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if (`SELECT @@binlog_format = 'ROW'`)
2+
{
3+
skip Test cannot run with binlog_format row;
4+
}

mysql-test/r/archive.result

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12728,3 +12728,12 @@ Table Op Msg_type Msg_text
1272812728
test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
1272912729
test.t1 repair error Corrupt
1273012730
DROP TABLE t1;
12731+
#
12732+
# BUG#48757 - missing .ARZ file causes server crash
12733+
#
12734+
CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
12735+
FLUSH TABLE t1;
12736+
SELECT * FROM t1;
12737+
ERROR HY000: Can't find file: 't1' (errno: 2)
12738+
DROP TABLE t1;
12739+
ERROR 42S02: Unknown table 't1'

mysql-test/r/backup.result

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ create table t4(n int);
44
backup table t4 to '../../bogus';
55
Table Op Msg_type Msg_text
66
test.t4 backup error Failed copying .frm file (errno: X)
7-
test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
7+
test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
88
test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X)
99
test.t4 backup status Operation failed
1010
backup table t4 to '../../tmp';
1111
Table Op Msg_type Msg_text
12-
test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
12+
test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
1313
test.t4 backup status OK
1414
backup table t4 to '../../tmp';
1515
Table Op Msg_type Msg_text
1616
test.t4 backup error Failed copying .frm file (errno: X)
17-
test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
17+
test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
1818
test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X)
1919
test.t4 backup status Operation failed
2020
drop table t4;
2121
restore table t4 from '../../tmp';
2222
Table Op Msg_type Msg_text
23-
test.t4 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
23+
test.t4 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2424
test.t4 restore status OK
2525
select count(*) from t4;
2626
count(*)
@@ -29,18 +29,18 @@ create table t1(n int);
2929
insert into t1 values (23),(45),(67);
3030
backup table t1 to '../../tmp';
3131
Table Op Msg_type Msg_text
32-
test.t1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
32+
test.t1 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
3333
test.t1 backup status OK
3434
drop table t1;
3535
restore table t1 from '../../bogus';
3636
Table Op Msg_type Msg_text
3737
t1 restore error Failed copying .frm file
3838
Warnings:
39-
Warning 1287 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
39+
Warning 1287 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
4040
Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
4141
restore table t1 from '../../tmp';
4242
Table Op Msg_type Msg_text
43-
test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
43+
test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
4444
test.t1 restore status OK
4545
select n from t1;
4646
n
@@ -53,13 +53,13 @@ insert into t2 values (123),(145),(167);
5353
insert into t3 values (223),(245),(267);
5454
backup table t2,t3 to '../../tmp';
5555
Table Op Msg_type Msg_text
56-
test.t2 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
56+
test.t2 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
5757
test.t2 backup status OK
5858
test.t3 backup status OK
5959
drop table t1,t2,t3;
6060
restore table t1,t2,t3 from '../../tmp';
6161
Table Op Msg_type Msg_text
62-
test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
62+
test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
6363
test.t1 restore status OK
6464
test.t2 restore status OK
6565
test.t3 restore status OK
@@ -81,27 +81,27 @@ k
8181
drop table t1,t2,t3,t4;
8282
restore table t1 from '../../tmp';
8383
Table Op Msg_type Msg_text
84-
test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
84+
test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
8585
test.t1 restore status OK
8686
rename table t1 to t5;
8787
lock tables t5 write;
8888
backup table t5 to '../../tmp';
8989
unlock tables;
9090
Table Op Msg_type Msg_text
91-
test.t5 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
91+
test.t5 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
9292
test.t5 backup status OK
9393
drop table t5;
9494
DROP TABLE IF EXISTS `t+1`;
9595
CREATE TABLE `t+1` (c1 INT);
9696
INSERT INTO `t+1` VALUES (1), (2), (3);
9797
BACKUP TABLE `t+1` TO '../../tmp';
9898
Table Op Msg_type Msg_text
99-
test.t+1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
99+
test.t+1 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
100100
test.t+1 backup status OK
101101
DROP TABLE `t+1`;
102102
RESTORE TABLE `t+1` FROM '../../tmp';
103103
Table Op Msg_type Msg_text
104-
test.t+1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead
104+
test.t+1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
105105
test.t+1 restore status OK
106106
SELECT * FROM `t+1`;
107107
c1

mysql-test/r/bug39022.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
2828
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
2929
# in thread2
3030
d
31-
# in default
31+
# in thread1;
3232
DROP TABLE t1,t2;

mysql-test/r/csv.result

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5394,17 +5394,24 @@ select * from t1;
53945394
ERROR HY000: File 'MYSQLD_DATADIR/test/t1.CSV' not found (Errcode: 2)
53955395
unlock tables;
53965396
drop table t1;
5397-
create table t1(a enum ('a') not null) engine=csv;
5398-
insert into t1 values (2);
5397+
CREATE TABLE t1 (e enum('foo','bar') NOT NULL) ENGINE = CSV;
5398+
INSERT INTO t1 VALUES();
5399+
INSERT INTO t1 VALUES(default);
5400+
INSERT INTO t1 VALUES(0);
53995401
Warnings:
5400-
Warning 1265 Data truncated for column 'a' at row 1
5401-
select * from t1 limit 1;
5402-
ERROR HY000: Table 't1' is marked as crashed and should be repaired
5403-
repair table t1;
5404-
Table Op Msg_type Msg_text
5405-
test.t1 repair Warning Data truncated for column 'a' at row 1
5406-
test.t1 repair status OK
5407-
select * from t1 limit 1;
5408-
a
5409-
drop table t1;
5402+
Warning 1265 Data truncated for column 'e' at row 1
5403+
INSERT INTO t1 VALUES(3);
5404+
Warnings:
5405+
Warning 1265 Data truncated for column 'e' at row 1
5406+
INSERT INTO t1 VALUES(-1);
5407+
Warnings:
5408+
Warning 1265 Data truncated for column 'e' at row 1
5409+
SELECT * FROM t1;
5410+
e
5411+
foo
5412+
foo
5413+
5414+
5415+
5416+
DROP TABLE t1;
54105417
End of 5.1 tests

mysql-test/r/default.result

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ insert into bug20691 values (2, 3, 5, '0007-01-01', 11, 13, 17, '0019-01-01 00:0
180180
insert into bug20691 values (DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, 4);
181181
Warnings:
182182
Warning 1364 Field 'a' doesn't have a default value
183-
Warning 1364 Field 'b' doesn't have a default value
184183
Warning 1364 Field 'c' doesn't have a default value
185184
Warning 1364 Field 'd' doesn't have a default value
186185
Warning 1364 Field 'e' doesn't have a default value
@@ -193,7 +192,7 @@ a b c d e f g h i x
193192
two large 00:00:05 0007-01-01 11 13 17 0019-01-01 00:00:00 23 1
194193
small 00:00:00 0000-00-00 0 0000-00-00 00:00:00 0 2
195194
two large 00:00:05 0007-01-01 11 13 17 0019-01-01 00:00:00 23 3
196-
00:00:00 0000-00-00 0 0000-00-00 00:00:00 0 4
195+
small 00:00:00 0000-00-00 0 0000-00-00 00:00:00 0 4
197196
drop table bug20691;
198197
create table t1 (id int not null);
199198
insert into t1 values(default);

mysql-test/r/fulltext.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,26 @@ WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
611611
count(*)
612612
0
613613
DROP TABLE t1,t2,t3;
614+
CREATE TABLE t1 (a VARCHAR(4), FULLTEXT(a));
615+
INSERT INTO t1 VALUES
616+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
617+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
618+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
619+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
620+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
621+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
622+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
623+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
624+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
625+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
626+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
627+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),
628+
('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('awrd'),('cwrd'),
629+
('awrd');
630+
SELECT COUNT(*) FROM t1 WHERE MATCH(a) AGAINST("+awrd bwrd* +cwrd*" IN BOOLEAN MODE);
631+
COUNT(*)
632+
0
633+
DROP TABLE t1;
614634
#
615635
# Bug #49445: Assertion failed: 0, file .\item_row.cc, line 55 with
616636
# fulltext search and row op

mysql-test/r/func_time.result

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1;
682682
timestampadd(SQL_TSI_FRAC_SECOND, 1, date)
683683
2003-01-02 00:00:00.000001
684684
Warnings:
685-
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
685+
Warning 1287 'FRAC_SECOND' is deprecated and will be removed in a future release. Please use MICROSECOND instead
686686
select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a;
687687
a
688688
3
@@ -717,7 +717,7 @@ select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05
717717
a
718718
7689538999999
719719
Warnings:
720-
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
720+
Warning 1287 'FRAC_SECOND' is deprecated and will be removed in a future release. Please use MICROSECOND instead
721721
select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1,
722722
timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2,
723723
timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3,
@@ -1088,7 +1088,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:
10881088
id select_type table type possible_keys key key_len ref rows filtered Extra
10891089
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
10901090
Warnings:
1091-
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
1091+
Warning 1287 'FRAC_SECOND' is deprecated and will be removed in a future release. Please use MICROSECOND instead
10921092
Note 1003 select timestampdiff(WEEK,'2001-02-01','2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,'2001-02-01 12:59:59.120000','2001-05-01 12:58:58.119999') AS `a2`
10931093
select time_format('100:00:00', '%H %k %h %I %l');
10941094
time_format('100:00:00', '%H %k %h %I %l')
@@ -1287,12 +1287,12 @@ SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18');
12871287
TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18')
12881288
2008-02-18 00:00:00.000001
12891289
Warnings:
1290-
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
1290+
Warning 1287 'FRAC_SECOND' is deprecated and will be removed in a future release. Please use MICROSECOND instead
12911291
SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18');
12921292
TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18')
12931293
86400000000
12941294
Warnings:
1295-
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
1295+
Warning 1287 'FRAC_SECOND' is deprecated and will be removed in a future release. Please use MICROSECOND instead
12961296
SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND);
12971297
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1
12981298
SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND);

mysql-test/r/group_min_max.result

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,6 +2524,19 @@ SELECT a, MAX(b) FROM t WHERE b GROUP BY a;
25242524
a MAX(b)
25252525
2 1
25262526
DROP TABLE t;
2527+
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL, KEY (b));
2528+
INSERT INTO t1 VALUES(1,1),(2,1);
2529+
ANALYZE TABLE t1;
2530+
Table Op Msg_type Msg_text
2531+
test.t1 analyze status OK
2532+
SELECT 1 AS c, b FROM t1 WHERE b IN (1,2) GROUP BY c, b;
2533+
c b
2534+
1 1
2535+
SELECT a FROM t1 WHERE b=1;
2536+
a
2537+
1
2538+
2
2539+
DROP TABLE t1;
25272540
End of 5.1 tests
25282541
#
25292542
# WL#3220 (Loose index scan for COUNT DISTINCT)

0 commit comments

Comments
 (0)