-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from github/enum-sort-test
WIP testing enum as part of PK
- Loading branch information
Showing
7 changed files
with
87 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
drop table if exists gh_ost_test; | ||
create table gh_ost_test ( | ||
id int auto_increment, | ||
i int not null, | ||
e enum('red', 'green', 'blue', 'orange') null default null collate 'utf8_bin', | ||
primary key(id, e) | ||
) auto_increment=1; | ||
|
||
drop event if exists gh_ost_test; | ||
delimiter ;; | ||
create event gh_ost_test | ||
on schedule every 1 second | ||
starts current_timestamp | ||
ends current_timestamp + interval 60 second | ||
on completion not preserve | ||
enable | ||
do | ||
begin | ||
insert into gh_ost_test values (null, 11, 'red'); | ||
set @last_insert_id := last_insert_id(); | ||
insert into gh_ost_test values (@last_insert_id, 11, 'green'); | ||
insert into gh_ost_test values (null, 13, 'green'); | ||
insert into gh_ost_test values (null, 17, 'blue'); | ||
set @last_insert_id := last_insert_id(); | ||
update gh_ost_test set e='orange' where id = @last_insert_id; | ||
insert into gh_ost_test values (null, 23, null); | ||
set @last_insert_id := last_insert_id(); | ||
update gh_ost_test set i=i+1, e=null where id = @last_insert_id; | ||
end ;; |