Skip to content

Conversation

@rahulmalik87
Copy link
Contributor

https://jira.percona.com/browse/PSTRESS-78

pstress-119 Option to manipulate length of CHAR, VARCHAR, BLOB
https://jira.percona.com/browse/PSTRESS-119

Introduced below new options

--columns-in-generated: maximum number of columns in a generated column
default#: 6

--generated-stored: Probability of generated columns STORED or VIRTUAL
50 ==> equal chances of stored and virtual
100 => all columns are stored
0 => all columns are virtual
any other value sets the probability of stored column accordingly
default#: 50

--char-length: char column maximum length
default#: 20

--varchar-length: varchar column maximum length.
default#: 40

--blob-length: Maximum lenght of blob/text columns
TINYBLOB/TINYTEXT 1/4 of blob-length
TEXT/BLOB 1/3 of blob-length
MEDIUMBLOB/MEDIUMTEXT 1/2 of blob-length
LONGBLOB/LONGTEXT blob-length
default#: 1000

https://jira.percona.com/browse/PSTRESS-78

pstress-119 Option to manipulate length of CHAR, VARCHAR, BLOB
https://jira.percona.com/browse/PSTRESS-119

Introduced below new options

--columns-in-generated: maximum number of columns in a generated column
 default#: 6

--generated-stored: Probability of generated columns STORED or VIRTUAL
50 ==> equal chances of stored and virtual
100 => all columns are stored
0 => all columns are virtual
any other value sets the probability of stored column accordingly
default#: 50

--char-length: char column maximum length
 default#: 20

--varchar-length: varchar column maximum length.
 default#: 40

--blob-length: Maximum lenght of blob/text columns
TINYBLOB/TINYTEXT 1/4 of blob-length
TEXT/BLOB 1/3 of blob-length
MEDIUMBLOB/MEDIUMTEXT 1/2 of blob-length
LONGBLOB/LONGTEXT blob-length
 default#: 1000
@rahulmalik87 rahulmalik87 requested a review from mohitj1988 July 5, 2022 10:10
@mohitj1988
Copy link
Contributor

We need to find an intelligent way to ensure the generated metadata does not exceed the maximum allowed row size.

2 CREATE TABLE tt_26 (ipkey INT AUTO_INCREMENT, f1 FLOAT, v2 VARCHAR(157), c3 CHAR(250), i4 INT, PRIMARY KEY(ipkey), INDEX tt_26i0(ipkey, i4 DESC, f1, c3 DESC, v2) ) ENCRYPTION='Y' TABLESPACE=tab02k_e KEY_BLOCK_SIZE=2 ENGINE=INNODB Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

Tested with different scenarios and all of them fails

./pstress-ps --tables 50 --records 50 --threads 5 --seconds 60 --socket /tmp/mysql_22000.sock --columns-in-generated 10 --generated-stored 50 --char-length 255 --varchar-length 255 --jlddl --log-all-queries --logdir pwd`/log

  • Connecting to default.node.tld []...
    metadata created randomly
    terminate called after throwing an instance of 'std::runtime_error'
    what(): Create table failed tt_26
    Aborted`

@rahulmalik87
Copy link
Contributor Author

This is really useful feature to generate big length queries.

@satya-bodapati
Copy link

@mohitj1988 can u please look into new changes since your last comment?

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

Successfully merging this pull request may close these issues.

3 participants