Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong create table statement #540

Open
qwh2580 opened this issue Oct 2, 2024 · 0 comments
Open

wrong create table statement #540

qwh2580 opened this issue Oct 2, 2024 · 0 comments

Comments

@qwh2580
Copy link

qwh2580 commented Oct 2, 2024

CREATE TABLE sbtest%d(
id %s,
k INTEGER DEFAULT '0' NOT NULL,
c CHAR(120) DEFAULT '' NOT NULL,
pad CHAR(60) DEFAULT '' NOT NULL,
%s (id)
) %s %s]],
table_num, id_def, id_index_def, engine_def,
sysbench.opt.create_table_options)

FATAL: `sysbench.cmdline.call_command' function failed: ./oltp_common.lua:203: SQL error, errno = 0, state = '42601': multiple default values specified for column "pad" of table "sbtest1"
Creating table 'sbtest10'...
FATAL: PQexec() failed: 7 multiple default values specified for column "pad" of table "sbtest9"
FATAL: failed query was: CREATE TABLE sbtest9(
id SERIAL,
k INTEGER DEFAULT '0' NOT NULL,
c VARCHAR(120) DEFAULT '' NOT NULL,
pad CHAR(60) DEFAULT '' NOT NULL DEFAULT '',
PRIMARY KEY (id)
)
correct create table statement
CREATE TABLE sbtest%d(
id %s,
k INTEGER NOT NULL DEFAULT '0',
c CHAR(120) NOT NULL DEFAULT '',
pad CHAR(60) NOT NULL DEFAULT '' ,
%s (id)
) %s %s]],
table_num, id_def, id_index_def, engine_def,
sysbench.opt.create_table_options)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant