Index: branches/FileBackend/phase3/maintenance/locking/file_locks.sql |
— | — | @@ -6,6 +6,6 @@ |
7 | 7 | -- Table to handle resource locking (SH) with row-level locking |
8 | 8 | CREATE TABLE /*_*/filelocks_shared ( |
9 | 9 | fls_key binary(31) NOT NULL, |
10 | | - fls_session integer unsigned NOT NULL, |
| 10 | + fls_session binary(31) NOT NULL, |
11 | 11 | PRIMARY KEY (fls_key,fls_session) |
12 | 12 | ) ENGINE=InnoDB, CHECKSUM=0; |
Index: branches/FileBackend/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php |
— | — | @@ -79,7 +79,11 @@ |
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | | - $this->session = mt_rand( 0, 2147483647 ); |
| 83 | + $this->session = ''; |
| 84 | + for ( $i = 0; $i < 5; $i++ ) { |
| 85 | + $this->session .= mt_rand( 0, 2147483647 ); |
| 86 | + } |
| 87 | + $this->session = wfBaseConvert( sha1( $this->session ), 16, 36, 31 ); |
84 | 88 | } |
85 | 89 | |
86 | 90 | protected function doLock( array $keys, $type ) { |