Skip to content

Instantly share code, notes, and snippets.

@cosimo
Created April 2, 2012 19:04
Show Gist options
  • Save cosimo/2286378 to your computer and use it in GitHub Desktop.
Save cosimo/2286378 to your computer and use it in GitHub Desktop.
mytap.dies_ok() ?
DELIMITER //
DROP PROCEDURE IF EXISTS populate_table //
CREATE PROCEDURE populate_table ()
BEGIN
DECLARE CONTINUE HANDLER FOR SQLSTATE '23000' BEGIN
SELECT tap.ok(
0,
'Dupkey error should not happen when inserting with collation latin1_swedish_ci'
);
END;
INSERT INTO t006 (id, username, note) VALUES (10, 'testuser1a', 'plain');
INSERT INTO t006 (id, username, note) VALUES (20, 'testuser1â', 'circumflex a');
INSERT INTO t006 (id, username, note) VALUES (30, 'testuser1à', 'a grave');
INSERT INTO t006 (id, username, note) VALUES (40, 'testuser1Å', 'A circ, 0xC385');
INSERT INTO t006 (id, username, note) VALUES (50, 'TestUser1A', 'mixed case');
INSERT INTO t006 (id, username, note) VALUES (60, 'TESTUSER1A', 'upper case');
END;
//
DELIMITER ;
CALL populate_table;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment