Chilly
Balls of steel
- Joined
- Dec 22, 2003
- Messages
- 9,047
why is
8484e64391d10b14d7938b1f7b37a4a1
an invalid table name?
335e9425552a4dcb762b4bc424ba0902
is also invalid.
According to mysql, a table name must be shorter than 64bytes long and can contain any characters that are legal in a unix filename excluding / \ . and ASCII 0 and ASCII 255.
Neither of these names seem to break this rule. Have I found a bug or am I missing something trivial?
I have experimented and found that appending the table name with an arbitrary letter, a, prevents the table name from being illegal. Likewise, appending "3" to the name seems to increase the chance the random table name generated will be illegal. I have collected a few table names that appear to be illegal and they all start with numbers
For reference, this problem cropped up when using temporary tables, and naming these tables with a (nearly) unique name generated from a random number that gets md5'd. Because the name is occasionally illegal the table did not get created and a load or errors cropped up because the program could not find the table to query.
Cheers,
Chilly
8484e64391d10b14d7938b1f7b37a4a1
an invalid table name?
335e9425552a4dcb762b4bc424ba0902
is also invalid.
According to mysql, a table name must be shorter than 64bytes long and can contain any characters that are legal in a unix filename excluding / \ . and ASCII 0 and ASCII 255.
Neither of these names seem to break this rule. Have I found a bug or am I missing something trivial?
I have experimented and found that appending the table name with an arbitrary letter, a, prevents the table name from being illegal. Likewise, appending "3" to the name seems to increase the chance the random table name generated will be illegal. I have collected a few table names that appear to be illegal and they all start with numbers
For reference, this problem cropped up when using temporary tables, and naming these tables with a (nearly) unique name generated from a random number that gets md5'd. Because the name is occasionally illegal the table did not get created and a load or errors cropped up because the program could not find the table to query.
Cheers,
Chilly