Skip to content
Snippets Groups Projects
Commit f1caa9db authored by Joaquin Casares's avatar Joaquin Casares
Browse files

Changed jdbc key from defaulting the primary key to KEY and now using YCSB_KEY...

Changed jdbc key from defaulting the primary key to KEY and now using YCSB_KEY since KEY isn't valid in MySQL code. Also added a MySQL version of create_table.
parent dec3c567
No related branches found
No related tags found
No related merge requests found
-- Creates a Table.
-- Drop the table if it exists;
DROP TABLE IF EXISTS usertable;
-- Create the user table with 5 fields.
CREATE TABLE usertable(YCSB_KEY VARCHAR (255) PRIMARY KEY,
FIELD1 TEXT, FIELD2 TEXT,
FIELD3 TEXT, FIELD4 TEXT,
FIELD5 TEXT, FIELD6 TEXT,
FIELD7 TEXT, FIELD8 TEXT,
FIELD9 TEXT, FIELD10 TEXT);
-- Creates a Table.
-- Drop the table if it exists;
DROP TABLE IF EXISTS USERTABLE;
DROP TABLE IF EXISTS usertable;
-- Create the user table with 5 fields.
CREATE TABLE usertable(KEY VARCHAR PRIMARY KEY,
CREATE TABLE usertable(YCSB_KEY VARCHAR PRIMARY KEY,
FIELD1 VARCHAR, FIELD2 VARCHAR,
FIELD3 VARCHAR, FIELD4 VARCHAR,
FIELD5 VARCHAR, FIELD6 VARCHAR,
......
......@@ -49,7 +49,7 @@ public interface JdbcDBClientConstants {
public static final int SUCCESS = 0;
/** The primary key in the user table.*/
public static String PRIMARY_KEY = "KEY";
public static String PRIMARY_KEY = "YCSB_KEY";
/** The field name prefix in the table.*/
public static String COLUMN_PREFIX = "FIELD";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment