Skip to content

Commit 1d4f998

Browse files
authored
Merge branch 'master' into master
2 parents 13b5f48 + 78dda8a commit 1d4f998

File tree

11 files changed

+144
-39
lines changed

11 files changed

+144
-39
lines changed

.travis.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

Dockerfile.packaging

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
3+
FROM golang:1.12.6
4+
5+
RUN apt-get update
6+
RUN apt-get install -y ruby ruby-dev rubygems build-essential
7+
RUN gem install --no-ri --no-rdoc fpm
8+
ENV GOPATH=/tmp/go
9+
10+
RUN apt-get install -y curl
11+
RUN apt-get install -y rsync
12+
RUN apt-get install -y gcc
13+
RUN apt-get install -y g++
14+
RUN apt-get install -y bash
15+
RUN apt-get install -y git
16+
RUN apt-get install -y tar
17+
RUN apt-get install -y rpm
18+
19+
RUN mkdir -p $GOPATH/src/github.com/github/gh-ost
20+
WORKDIR $GOPATH/src/github.com/github/gh-ost
21+
COPY . .
22+
RUN bash build.sh

RELEASE_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.48
1+
1.0.49

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ main() {
6161

6262
mkdir -p ${buildpath}
6363
rm -rf ${buildpath:?}/*
64-
build macOS osx darwin amd64
6564
build GNU/Linux linux linux amd64
65+
# build macOS osx darwin amd64
6666

6767
echo "Binaries found in:"
68-
ls -1 $buildpath/gh-ost-binary*${timestamp}.tar.gz
68+
find $buildpath/gh-ost* -type f -maxdepth 1
6969
}
7070

7171
main "$@"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id bigint auto_increment,
4+
val bigint not null,
5+
primary key(id)
6+
) auto_increment=1;
7+
8+
drop event if exists gh_ost_test;
9+
delimiter ;;
10+
create event gh_ost_test
11+
on schedule every 1 second
12+
starts current_timestamp
13+
ends current_timestamp + interval 60 second
14+
on completion not preserve
15+
enable
16+
do
17+
begin
18+
insert into gh_ost_test values (null, 18446744073709551615);
19+
insert into gh_ost_test values (null, 18446744073709551614);
20+
insert into gh_ost_test values (null, 18446744073709551613);
21+
end ;;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--alter="change val val bigint"

localtests/latin1text/create.sql

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id int auto_increment,
4+
t text charset latin1 collate latin1_swedish_ci,
5+
primary key(id)
6+
) auto_increment=1 charset latin1 collate latin1_swedish_ci;
7+
8+
drop event if exists gh_ost_test;
9+
delimiter ;;
10+
create event gh_ost_test
11+
on schedule every 1 second
12+
starts current_timestamp
13+
ends current_timestamp + interval 60 second
14+
on completion not preserve
15+
enable
16+
do
17+
begin
18+
insert into gh_ost_test values (null, md5(rand()));
19+
insert into gh_ost_test values (null, 'átesting');
20+
insert into gh_ost_test values (null, 'ádelete');
21+
insert into gh_ost_test values (null, 'testátest');
22+
update gh_ost_test set t='áupdated' order by id desc limit 1;
23+
update gh_ost_test set t='áupdated1' where t='áupdated' order by id desc limit 1;
24+
delete from gh_ost_test where t='ádelete';
25+
end ;;

localtests/swap-uk-uk/create.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
drop table if exists gh_ost_test;
22
create table gh_ost_test (
3-
id bigint,
3+
id bigint not null,
44
i int not null,
5-
ts timestamp(6),
5+
ts timestamp(6) not null,
66
unique key id_uidx(id),
77
unique key its_uidx(i, ts)
88
) ;

localtests/varbinary/create.sql

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id binary(16) NOT NULL,
4+
info varchar(255) COLLATE utf8_unicode_ci NOT NULL,
5+
data binary(8) NOT NULL,
6+
primary key (id),
7+
unique key info_uidx (info)
8+
) auto_increment=1;
9+
10+
drop event if exists gh_ost_test;
11+
delimiter ;;
12+
create event gh_ost_test
13+
on schedule every 1 second
14+
starts current_timestamp
15+
ends current_timestamp + interval 60 second
16+
on completion not preserve
17+
enable
18+
do
19+
begin
20+
replace into gh_ost_test (id, info, data) values (X'12ffffffffffffffffffffffffffff00', 'item 1a', X'12ffffffffffffff');
21+
replace into gh_ost_test (id, info, data) values (X'34ffffffffffffffffffffffffffffff', 'item 3a', X'34ffffffffffffff');
22+
replace into gh_ost_test (id, info, data) values (X'90ffffffffffffffffffffffffffffff', 'item 9a', X'90ffffffffffff00');
23+
24+
DELETE FROM gh_ost_test WHERE id = X'11ffffffffffffffffffffffffffff00';
25+
UPDATE gh_ost_test SET info = 'item 2++' WHERE id = X'22ffffffffffffffffffffffffffff00';
26+
UPDATE gh_ost_test SET info = 'item 3++', data = X'33ffffffffffff00' WHERE id = X'33ffffffffffffffffffffffffffffff';
27+
DELETE FROM gh_ost_test WHERE id = X'44ffffffffffffffffffffffffffffff';
28+
UPDATE gh_ost_test SET info = 'item 5++', data = X'55ffffffffffffee' WHERE id = X'55ffffffffffffffffffffffffffffff';
29+
INSERT INTO gh_ost_test (id, info, data) VALUES (X'66ffffffffffffffffffffffffffff00', 'item 6', X'66ffffffffffffff');
30+
INSERT INTO gh_ost_test (id, info, data) VALUES (X'77ffffffffffffffffffffffffffffff', 'item 7', X'77ffffffffffff00');
31+
INSERT INTO gh_ost_test (id, info, data) VALUES (X'88ffffffffffffffffffffffffffffff', 'item 8', X'88ffffffffffffff');
32+
end ;;
33+
34+
INSERT INTO gh_ost_test (id, info, data) VALUES
35+
(X'11ffffffffffffffffffffffffffff00', 'item 1', X'11ffffffffffffff'), -- id ends in 00
36+
(X'22ffffffffffffffffffffffffffff00', 'item 2', X'22ffffffffffffff'), -- id ends in 00
37+
(X'33ffffffffffffffffffffffffffffff', 'item 3', X'33ffffffffffffff'),
38+
(X'44ffffffffffffffffffffffffffffff', 'item 4', X'44ffffffffffffff'),
39+
(X'55ffffffffffffffffffffffffffffff', 'item 5', X'55ffffffffffffff'),
40+
(X'99ffffffffffffffffffffffffffffff', 'item 9', X'99ffffffffffff00'); -- data ends in 00

script/cibuild-gh-ost-replica-tests

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ test_mysql_version() {
5050

5151
export PATH="${PWD}/gh-ost-ci-env/bin/:${PATH}"
5252

53-
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%' identified by 'gh-ost'"
53+
gh-ost-test-mysql-master -uroot -e "create user 'gh-ost'@'%' identified by 'gh-ost'"
54+
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%'"
5455

5556
echo "### Running gh-ost tests for $mysql_version"
5657
./localtests/test.sh -b bin/gh-ost
@@ -61,6 +62,9 @@ test_mysql_version() {
6162
echo "Building..."
6263
. script/build
6364
# Test all versions:
65+
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.gz" | while read f ; do basename $f ".tar.gz" ; done | sort -r | while read mysql_version ; do
66+
echo "found MySQL version: $mysql_version"
67+
done
6468
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.gz" | while read f ; do basename $f ".tar.gz" ; done | sort -r | while read mysql_version ; do
6569
test_mysql_version "$mysql_version"
6670
done

0 commit comments

Comments
 (0)