Repository navigation
Closed
Milestone
Description
Steps
- Setup v8.0.5
- Create a folder "test"
- Share "test" with link and allow editing
- Open the link
- Upload a picture "test.jpg"
- Update the code to v8.1.0
- Refresh the public link page, the update prompt appears
- Click "Start update"
- Update the code to master (8.2)
- Run the update again in the web UI
Expected result
Successful update.
Actual result
{"reqId":"+Q2f7rZoXjSyoF7YZcqH","remoteAddr":"127.0.0.1","app":"update","message":"Exception: {\"Exception\":\"OC\\\\DB\\\\MigrationException\",\"Message\":\"An exception occurred while executing 'CREATE INDEX oc_qstjvjnerxxxi ON oc_oc_share_ill10p4z0s4zo (`file_target`)':\\n\\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes\",\"Code\":0,\"Trace\":\"#0 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/db\\\/migrator.php(110): OC\\\\DB\\\\Migrator->checkTableMigrate(Object(Doctrine\\\\DBAL\\\\Schema\\\\Table))\\n
#1 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/db\\\/mdb2schemamanager.php(133): OC\\\\DB\\\\Migrator->checkMigrate(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n
#2 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/db.php(248): OC\\\\DB\\\\MDB2SchemaManager->simulateUpdateDbFromStructure('\\\/srv\\\/www\\\/htdocs...')\\n
#3 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/updater.php(319): OC_DB::simulateUpdateDbFromStructure('\\\/srv\\\/www\\\/htdocs...')\\n
#4 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/updater.php(286): OC\\\\Updater->checkCoreUpgrade()\\n
#5 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/updater.php(195): OC\\\\Updater->doUpgrade('8.2.0.1', '8.0.5.2')\\n
#6 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/core\\\/ajax\\\/update.php(88): OC\\\\Updater->upgrade()\\n
#7 {main}\",\"File\":\"\\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/db\\\/migrator.php\",\"Line\":152}","level":4,"time":"2015-07-13T16:02:22+00:00","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=P3lDxfKIv1yPEMEk0Aefeb3yqkAm7Q"}
MariaDB [owncloud]> select * from oc_share;
+----+------------+------------+-----------+--------+-----------+-------------+-------------+-------------+-------------+-------------+------------+----------+------------+-----------------+-----------+
| id | share_type | share_with | uid_owner | parent | item_type | item_source | item_target | file_source | file_target | permissions | stime | accepted | expiration | token | mail_send |
+----+------------+------------+-----------+--------+-----------+-------------+-------------+-------------+-------------+-------------+------------+----------+------------+-----------------+-----------+
| 2 | 3 | NULL | root | NULL | folder | 8 | /8 | 8 | /fold | 7 | 1436803256 | 0 | NULL | y5u9ZPjCBnvleai | 0 |
+----+------------+------------+-----------+--------+-----------+-------------+-------------+-------------+-------------+-------------+------------+----------+------------+-----------------+-----------+
1 row in set (0.01 sec)
Enabled apps
The default ones when checked out from git. (no third party)
Versions
v8.0.5 -> v8.1.0 -> master (1006ec5)
mariadb-10.0.13-2.6.1.x86_64
Happened twice. But the first time I upgraded directly from v8.0.5 to master.
And now happens too doing the three steps.
Activity
PVince81 commentedon Jul 13, 2015
Works properly with SQLite, must be MariaDB-specific
PVince81 commentedon Jul 13, 2015
Possibly related to the recent indices additions.
@MorrisJobke did you really think it is that easy to add new indices ? 😉
MorrisJobke commentedon Jul 14, 2015
Why are such strange characters at the end?
MorrisJobke commentedon Jul 14, 2015
I tried it multiple times (with both console and command line upgrade). I never experienced any problems.
PVince81 commentedon Jul 14, 2015
No idea.
I had this happening on two computers already. The one from my original report was mentioned above (it was on openSUSE 13.2), and I also had it on my laptop which has openSUSE Factory with mariadb-10.0.17-1.3.x86_64 (mysql Ver 15.1 Distrib 10.0.17-MariaDB, for Linux (x86_64) using EditLine wrapper)
Maybe your mysql is too recent ? 😉
PVince81 commentedon Jul 14, 2015
Would be good if someone else could confirm this issue @icewind1991 @DeepDiver1975 ?
DeepDiver1975 commentedon Jul 14, 2015
There is nothing magic to this - the max key length with InnoDB is 767 bytes.
Having a 3-byte charset a column with varchar(512) simply exceeds this max length
512*3 = 1536
MorrisJobke commentedon Jul 14, 2015
I will remove the index in a PR
Remove index on file_target of share table
MorrisJobke commentedon Jul 14, 2015
#17639