One nice fall day my brother when playing with beta of Vortex 1.1 noticed that the code for uploading design objects is broken. I tried it, and everything seemed to be ok. But Pepa complained again. Ok, I make it shorter, after a while I have found that the problem is in different implementation of LENGTH command accross database vendors. Ok, so where was the problem? I was trying to get the size of the design object from the database. So I was using LENGTH function for this. The problem is that Mysql treats LENGTH for BLOB columns as number of bytes, but HSQLDB which was Pepa using as backing database returns number of bytes, but doubled. I don't know if this is bug in HSQLDB, or they are just misinterpreting the meaning, or I do. They write in documentation:
LENGTH(s)
returns the number of characters in s
they also have function
| 01 | 02 | 03 | 04 | 05 | 06 | 07 |
| 08 | 09 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |