| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 | print("CREATE TABLE stuff (x string, y string, z srting);")
local chars = { "\"", "0", ",", "\t", "\n", "\\" }
local function literal ()
	local out = {"'"}
	for i = 1, math.random(1, 40) do
		table.insert(out, chars[math.random(#chars)])
	end
	table.insert(out, "'")
	return table.concat(out)
end
for i = 1, tonumber(arg[1]) do
	print(string.format("INSERT INTO stuff(x, y, z) VALUES (%s, %s, %s);",
		literal(), literal(), literal()))
end
print(".mode csv")
print("SELECT * from stuff;")
 |