google-code-export / camlistore

Automatically exported from code.google.com/p/camlistore
Apache License 2.0
0 stars 0 forks source link

mysql: change width of key/value #429

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Apparently VARCHAR(255) isn't enough.  This is 255 bytes and truncates the 
blobref:

Error parsing config: Caught panic: error instantiating handler for prefix 
"/my-search/", type "search": error slurping index to memory: bogus claim row: 
"claim|sha1-09dd79f2531185652c6ec1fd28e6c0c67b13c74f|94DE83C46401800C|2014-04-23
T02:14:20.629653304Z|sha1-974a8cf7ce8982d7ee90c67a026e1ae5ff8dfbd9" -> 
"set-attribute|title|Checkin+at+%D0%9C%D0%B5%D0%B6%D0%B4%D1%83%D0%BD%D0%B0%D1%80
%D0%BE%D0%B4%D0%BD%D1%8B%D0%B9+%D0%B0%D1%8D%D1%80%D0%BE%D0%BF%D0%BE%D1%80%D1%82+
%D0%92%D0%BD%D1%83%D0%BA%D0%BE%D0%B2%D0%BE+%2F+Vnukovo+International+Airport+%28
VKO%29|sha1-f72d"

We should also document & limit the size of permanode attribute names & values.

Original issue reported on code.google.com by bradfitz on 23 Apr 2014 at 5:18

GoogleCodeExporter commented 9 years ago
I just did by hand on my server:

mysql> alter table rows modify v varbinary(65000) DEFAULT NULL;

This didn't work:

mysql> alter table rows modify v varbinary(65535) DEFAULT NULL;
ERROR 1118 (42000): Row size too large. The maximum row size for the used table 
type, not counting BLOBs, is 65535. You have to change some columns to TEXT or 
BLOBs

Apparently only in MySQL 5.0.n something and above can you do such large 
varchar columns.

But we should figure this out for all KeyValues.

Original comment by bradfitz on 23 Apr 2014 at 5:21

GoogleCodeExporter commented 9 years ago
I apparently have 200 (exactly!?) rows with values of length 255:

e.g.

mysql> select * from rows where length(v) = 255;

| exiftag|sha1-e1263ff8647bd827cdaa96fb2f843b3ccc86d13a|8298                    
                                                                    | string|1| 

      |
| exiftag|sha1-e1263ff8647bd827cdaa96fb2f843b3ccc86d13a|8649                    
                                                                    | 
int|17786|56|66|73|77|4|4|0|0|0|0|0|140|28|2|0|0|2|0|2|28|2|116|0|128|32|32|32|3
2|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|
32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32|32
|32|32|32|32|32 |
| exiftag|sha1-e1b9e4b64b498eedc34a0caea6b43b3956649c47|8649                    
                                                                    | 
int|15600|56|66|73|77|4|4|0|0|0|0|0|7|28|2|0|0|2|0|2|0|56|66|73|77|4|37|0|0|0|0|
0|16|70|12|242|137|38|184|86|218|176|156|1|161|176|167|144|119|56|66|73|77|3|234
|0|0|0|0|29|176|60|63|120|109|108|32|118|101|114|115|105|111|110|61|34|49|46|48|
34|32|101|110|9 |
| exiftag|sha1-e1c9143bf13b3bf620647e56deaa6a38e4fe1916|8649                    
                                                                    | 
int|17728|56|66|73|77|4|4|0|0|0|0|0|7|28|2|0|0|2|0|2|0|56|66|73|77|4|37|0|0|0|0|
0|16|70|12|242|137|38|184|86|218|176|156|1|161|176|167|144|119|56|66|73|77|3|234
|0|0|0|0|29|176|60|63|120|109|108|32|118|101|114|115|105|111|110|61|34|49|46|48|
34|32|101|110|9 |
| exiftag|sha1-e2b433106a9cc5b89143ece2f3ee50b3b8341814|8649                    
                                                                    | 
int|14200|56|66|73|77|4|4|0|0|0|0|0|7|28|2|0|0|2|0|2|0|56|66|73|77|4|37|0|0|0|0|
0|16|70|12|242|137|38|184|86|218|176|156|1|161|176|167|144|119|56|66|73|77|3|234
|0|0|0|0|29|176|60|63|120|109|108|32|118|101|114|115|105|111|110|61|34|49|46|48|
34|32|101|110|9 |
| exiftag|sha1-e4e0634505057bc2076f19543343aafa898c83ea|8649                    
                                                                    | 
int|17290|56|66|73|77|4|4|0|0|0|0|0|7|28|2|0|0|2|0|2|0|56|66|73|77|4|37|0|0|0|0|
0|16|70|12|242|137|38|184|86|218|176|156|1|161|176|167|144|119|56|66|73|77|3|234
|0|0|0|0|29|176|60|63|120|109|108|32|118|101|114|115|105|111|110|61|34|49|46|48|
34|32|101|110|9 |
| exiftag|sha1-e7e3ee098dd36ff75006631b941fa5a722f30c0c|8298                    
                                                                    | string|1|

Original comment by bradfitz on 23 Apr 2014 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by bradfitz on 21 Oct 2014 at 2:49

GoogleCodeExporter commented 9 years ago
This issue has moved to https://camlistore.org/issue/429

Original comment by bradfitz on 14 Dec 2014 at 11:37