Last active
February 23, 2018 13:41
-
-
Save wwwted/10656c765dac2c988ba567d5c710c7e6 to your computer and use it in GitHub Desktop.
Simple table with some NDB testdata
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
drop database IF EXISTS ted; | |
create database ted; | |
use ted; | |
create table test ( | |
id int primary key auto_increment, | |
name varchar(32), | |
address varchar(32), | |
age int, | |
index (name) | |
)engine=ndbcluster; | |
DELIMITER $$ | |
CREATE PROCEDURE prepare_data() | |
BEGIN | |
DECLARE i INT DEFAULT 100; | |
WHILE i < 10000 DO | |
INSERT INTO ted.test (id,name,address,age) VALUES (i,CONCAT("ted",i),CONCAT("address",i),i); | |
SET i = i + 1; | |
END WHILE; | |
END$$ | |
DELIMITER ; | |
CALL prepare_data(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment