Bug 426366 - Can only select 64 folders in search
Summary: Can only select 64 folders in search
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: search (show other bugs)
Version: 5.15.0
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-10 11:19 UTC by grannie
Modified: 2020-09-16 10:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description grannie 2020-09-10 11:19:34 UTC
kmail2 5.15.1 (20.08.1)


1. Open search
2. select specific folders
3. select 65 or more
4. dont comment on my amount of folders...

Error:
DATABASE ERROR:
Error code: "1406"
DB error:  "Data too long for column 'queryCollections' at row 1"
Error text: "Data too long for column 'queryCollections' at row 1 QMYSQL3: Unable to execute statement"
Values: QMap((":0", QVariant(QString, ""))(":1", QVariant(QString, ""))(":10", QVariant(int, -1))(":11", QVariant(int, -1))(":12", QVariant(bool, false))(":13", QVariant(QString, ""))(":14", QVariant(QString, "{\n    \"limit\": -1,\n    \"negated\": false,\n    \"rel\": 0,\n    \"subTerms\": [\n        {\n            \"negated\": false,\n            \"rel\": 1,\n            \"subTerms\": [\n                {\n                    \"cond\": 5,\n                    \"key\": \"from\",\n                    \"negated\": false,\n                    \"value\": \"something\"\n                }\n            ]\n        }\n    ]\n}\n"))(":15", QVariant(QString, ""))(":16", QVariant(QString, "130 131 132 133 134 135 136 138 139 140 141 142 143 144 146 147 148 149 150 151 152 153 155 156 157 158 159 160 161 170 171 172 173 174 175 176 187 188 189 190 190 191 191 192 192 193 194 194 196 196 198 199 200 201 202 203 204 217 333 334 335 336 337 338 339"))(":17", QVariant(bool, true))(":18", QVariant(qlonglong, 343))(":2", QVariant(QString, "@something"))(":3", QVariant(qlonglong, 1))(":4", QVariant(qlonglong, 1))(":5", QVariant(bool, true))(":6", QVariant(int, 2))(":7", QVariant(int, 2))(":8", QVariant(int, 2))(":9", QVariant(bool, true)))
Query: "UPDATE CollectionTable SET remoteId = :0, remoteRevision = :1, name = :2, parentId = :3, resourceId = :4, enabled = :5, syncPref = :6, displayPref = :7, indexPref = :8, cachePolicyInherit = :9, cachePolicyCheckInterval = :10, cachePolicyCacheTimeout = :11, cachePolicySyncOnDemand = :12, cachePolicyLocalParts = :13, queryString = :14, queryAttributes = :15, queryCollections = :16, isVirtual = :17 WHERE ( id = :18 )"
         
By trial and error combined with bisection :D I came to the conclusion that 65 folders is too much (value 16 (obviously a list of folders) has 65 words, 260 bytes)
With 64 folders it works - could also be a string length problem (but 260 seems to be a weird boundary - 64 is more sympathic due to the fact that it's a power of 2)
Comment 1 grannie 2020-09-16 10:54:04 UTC
ok , it could be a string length problem - 64 folders would result in a string length of 255 (given that they have 3 digits an are separated by blanks) :D