Skip to content

Commit 4099bb2

Browse files
Merge branch 'master' of percona.github.com:Percona-Lab/random_data_load
2 parents 501f333 + b09e4f5 commit 4099bb2

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This is an early stage project.
4545
The program can detect if a field accepts NULLs and if it does, it will generate NULLs ramdomly (~ 10 % of the values).
4646

4747
## Usage
48-
`random-data-generator <database> <table> <number of rows> [options...]`
48+
`mysql_random_data_load <database> <table> <number of rows> [options...]`
4949

5050
## Options
5151
|Option|Description|
@@ -66,7 +66,7 @@ If a field has Foreign Keys constraints, `random-data-load` will get up to `--ma
6666
The number of samples to get follows this rules:
6767
**1.** Get the aproximate number of rows in the referenced table using the `rows` field in:
6868
```
69-
EXPLAIN COUNT(*) FROM <referenced schema>.<referenced table>
69+
EXPLAIN SELECT COUNT(*) FROM <referenced schema>.<referenced table>
7070
```
7171
**1.1** If the number of rows is less than `max-fk-samples`, all rows are retrieved from the referenced table using this query:
7272
```
@@ -153,6 +153,20 @@ tcol28: 6.12
153153
1 row in set (0.00 sec)
154154
```
155155

156+
## How to download the precompiled binaries
157+
158+
There are binaries available for each version for Linux and Darwin. You can find compiled binaries for each version in the releases tab:
159+
160+
https://github.com/Percona-Lab/mysql_random_data_load/releases
161+
162+
You can copy a link for the binary you want (in this case for 1.0.5), and use wget to download:
163+
164+
```
165+
cd ~/bin/
166+
wget https://github.com/Percona-Lab/mysql_random_data_load/releases/download/0.1.5/mysql_random_data_load_linux_amd64
167+
chmod +x mysql_random_data_load_linux_amd64
168+
```
169+
156170
## To do
157171
- [ ] Add suport for all data types.
158172
- [X] Add supporrt for foreign keys.

tableparser/tableparser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type IndexField struct {
3232
SeqInIndex int
3333
ColumnName string
3434
Collation sql.NullString
35-
Cardinality int
35+
Cardinality sql.NullInt64
3636
SubPart sql.NullInt64
3737
Packed sql.NullString
3838
Null string

0 commit comments

Comments
 (0)