が SQLite を使用して BLOB でどのように機能するかを確認していたところ、以下に示すように の長さが 0であるため、 の長さが 1 でlength(x)
あることに驚きました。どちらも長さが0であってはいけませんか?そうでない場合、なぜですか?randomblob(0)
zeroblob(0)
randomblob(0)
zeroblob(0)
SQLite version 3.7.11 2012-03-20 11:35:50
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select length(zeroblob(0));
0
sqlite> select length(zeroblob(1));
1
sqlite> select length(zeroblob(2));
2
sqlite> select length(randomblob(0));
1
sqlite> select length(randomblob(1));
1
sqlite> select length(randomblob(2));
2