Bug #48462 mysqlslap using dynamical data for load generation
Description:
Customer would like to have mysqlslap using dynamicaly predefined data like supersmack does.
How to repeat:
n.a.
Suggested fix:
The only concern at the moment with mysqlslap was related to the impossibility of dynamically feed the query I had.
Supersmack do that with something called a dictionnary :
(extract from the MANUAL)
---
dictionary object has the following members/attributes:
type "rand"/"seq"/"unique" :
"rand" - the dictionary is initialized with a list of words, and they are
retrieved in random order
"seq" - the words are retrieved in the sequential order
"unique" - each word is generated by snprintf(buf, buf_size, template, id),
and id is incremented by 1
source_type "file"/"list"/"template" -
should the dictionary be initialized from a file,
a user-defined list, or using a template?
source - if the source type is file, tells us which file the dictionary is in,
if list, provided a comma-delimited list of entries, if the source is a
template, use it as a sprintf() format template.
---
So perhaps mysqlslap could add an extra parameter, let's say 'dico' :
mysqlslap -uuser_agadal -p -vvv --dico=dico.csv --concurrency=1 --iterations=1 --query="udpate mytable set field1=$1, field2=$2"
with $1 which could be the first value in my dico.csv file, $2 the 2nd...
(dico.csv )
---
2;3;
1;2;
4;5;
[...]
---
I don't know the best way to do it but that's the idea.
I know now how to use concat + mysqlslap to do the same thing but I'd appreciate to do that in only one tool.
Perhaps we can add the possibility to retrieve the $1, $2 from a query and not from a file, that's the last idea you proposed.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.063 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.