@@ -90,6 +90,7 @@ private function setupFileCache(): void {
9090 'storage_id ' => $ query ->createNamedParameter (1001001 , IQueryBuilder::PARAM_INT ),
9191 'user_id ' => $ query ->createNamedParameter ('partitioned_test ' ),
9292 'mount_point ' => $ query ->createNamedParameter ('/mount/point ' ),
93+ 'mount_point_hash ' => $ query ->createNamedParameter (hash ('xxh128 ' , '/mount/point ' )),
9394 'mount_provider_class ' => $ query ->createNamedParameter ('test ' ),
9495 'root_id ' => $ query ->createNamedParameter ($ fileId , IQueryBuilder::PARAM_INT ),
9596 ]);
@@ -138,7 +139,7 @@ public function testSimplePartitionedQuery(): void {
138139 $ builder ->addPartition (new PartitionSplit ('filecache ' , ['filecache ' ]));
139140
140141 // query borrowed from UserMountCache
141- $ query = $ builder ->select ('storage_id ' , 'root_id ' , 'user_id ' , 'mount_point ' , 'mount_id ' , 'f.path ' , 'mount_provider_class ' )
142+ $ query = $ builder ->select ('storage_id ' , 'root_id ' , 'user_id ' , 'mount_point ' , 'mount_point_hash ' , ' mount_id ' , 'f.path ' , 'mount_provider_class ' )
142143 ->from ('mounts ' , 'm ' )
143144 ->innerJoin ('m ' , 'filecache ' , 'f ' , $ builder ->expr ()->eq ('m.root_id ' , 'f.fileid ' ))
144145 ->where ($ builder ->expr ()->eq ('storage_id ' , $ builder ->createNamedParameter (1001001 , IQueryBuilder::PARAM_INT )));
@@ -151,6 +152,7 @@ public function testSimplePartitionedQuery(): void {
151152 $ this ->assertCount (1 , $ results );
152153 $ this ->assertEquals ($ results [0 ]['user_id ' ], 'partitioned_test ' );
153154 $ this ->assertEquals ($ results [0 ]['mount_point ' ], '/mount/point ' );
155+ $ this ->assertEquals ($ results [0 ]['mount_point_hash ' ], hash ('xxh128 ' , '/mount/point ' ));
154156 $ this ->assertEquals ($ results [0 ]['mount_provider_class ' ], 'test ' );
155157 $ this ->assertEquals ($ results [0 ]['path ' ], 'file1 ' );
156158 }
@@ -159,7 +161,7 @@ public function testMultiTablePartitionedQuery(): void {
159161 $ builder = $ this ->getQueryBuilder ();
160162 $ builder ->addPartition (new PartitionSplit ('filecache ' , ['filecache ' , 'filecache_extended ' ]));
161163
162- $ query = $ builder ->select ('storage_id ' , 'root_id ' , 'user_id ' , 'mount_point ' , 'mount_id ' , 'f.path ' , 'mount_provider_class ' , 'fe.upload_time ' )
164+ $ query = $ builder ->select ('storage_id ' , 'root_id ' , 'user_id ' , 'mount_point ' , 'mount_point_hash ' , ' mount_id ' , 'f.path ' , 'mount_provider_class ' , 'fe.upload_time ' )
163165 ->from ('mounts ' , 'm ' )
164166 ->innerJoin ('m ' , 'filecache ' , 'f ' , $ builder ->expr ()->eq ('m.root_id ' , 'f.fileid ' ))
165167 ->innerJoin ('f ' , 'filecache_extended ' , 'fe ' , $ builder ->expr ()->eq ('f.fileid ' , 'fe.fileid ' ))
@@ -173,6 +175,7 @@ public function testMultiTablePartitionedQuery(): void {
173175 $ this ->assertCount (1 , $ results );
174176 $ this ->assertEquals ($ results [0 ]['user_id ' ], 'partitioned_test ' );
175177 $ this ->assertEquals ($ results [0 ]['mount_point ' ], '/mount/point ' );
178+ $ this ->assertEquals ($ results [0 ]['mount_point_hash ' ], hash ('xxh128 ' , '/mount/point ' ));
176179 $ this ->assertEquals ($ results [0 ]['mount_provider_class ' ], 'test ' );
177180 $ this ->assertEquals ($ results [0 ]['path ' ], 'file1 ' );
178181 $ this ->assertEquals ($ results [0 ]['upload_time ' ], 1234 );
@@ -182,7 +185,7 @@ public function testPartitionedQueryFromSplit(): void {
182185 $ builder = $ this ->getQueryBuilder ();
183186 $ builder ->addPartition (new PartitionSplit ('filecache ' , ['filecache ' ]));
184187
185- $ query = $ builder ->select ('storage ' , 'm.root_id ' , 'm.user_id ' , 'm.mount_point ' , 'm.mount_id ' , 'path ' , 'm.mount_provider_class ' )
188+ $ query = $ builder ->select ('storage ' , 'm.root_id ' , 'm.user_id ' , 'm.mount_point ' , 'm.mount_point_hash ' , ' m. mount_id ' , 'path ' , 'm.mount_provider_class ' )
186189 ->from ('filecache ' , 'f ' )
187190 ->innerJoin ('f ' , 'mounts ' , 'm ' , $ builder ->expr ()->eq ('m.root_id ' , 'f.fileid ' ));
188191 $ query ->where ($ builder ->expr ()->eq ('storage ' , $ builder ->createNamedParameter (1001001 , IQueryBuilder::PARAM_INT )));
@@ -195,6 +198,7 @@ public function testPartitionedQueryFromSplit(): void {
195198 $ this ->assertCount (1 , $ results );
196199 $ this ->assertEquals ($ results [0 ]['user_id ' ], 'partitioned_test ' );
197200 $ this ->assertEquals ($ results [0 ]['mount_point ' ], '/mount/point ' );
201+ $ this ->assertEquals ($ results [0 ]['mount_point_hash ' ], hash ('xxh128 ' , '/mount/point ' ));
198202 $ this ->assertEquals ($ results [0 ]['mount_provider_class ' ], 'test ' );
199203 $ this ->assertEquals ($ results [0 ]['path ' ], 'file1 ' );
200204 }
@@ -204,7 +208,7 @@ public function testMultiJoinPartitionedQuery(): void {
204208 $ builder ->addPartition (new PartitionSplit ('filecache ' , ['filecache ' ]));
205209
206210 // query borrowed from UserMountCache
207- $ query = $ builder ->select ('storage_id ' , 'root_id ' , 'user_id ' , 'mount_point ' , 'mount_id ' , 'f.path ' , 'mount_provider_class ' )
211+ $ query = $ builder ->select ('storage_id ' , 'root_id ' , 'user_id ' , 'mount_point ' , 'mount_point_hash ' , ' mount_id ' , 'f.path ' , 'mount_provider_class ' )
208212 ->selectAlias ('s.id ' , 'storage_string_id ' )
209213 ->from ('mounts ' , 'm ' )
210214 ->innerJoin ('m ' , 'filecache ' , 'f ' , $ builder ->expr ()->eq ('m.root_id ' , 'f.fileid ' ))
@@ -219,6 +223,7 @@ public function testMultiJoinPartitionedQuery(): void {
219223 $ this ->assertCount (1 , $ results );
220224 $ this ->assertEquals ($ results [0 ]['user_id ' ], 'partitioned_test ' );
221225 $ this ->assertEquals ($ results [0 ]['mount_point ' ], '/mount/point ' );
226+ $ this ->assertEquals ($ results [0 ]['mount_point_hash ' ], hash ('xxh128 ' , '/mount/point ' ));
222227 $ this ->assertEquals ($ results [0 ]['mount_provider_class ' ], 'test ' );
223228 $ this ->assertEquals ($ results [0 ]['path ' ], 'file1 ' );
224229 $ this ->assertEquals ($ results [0 ]['storage_string_id ' ], 'test1 ' );
0 commit comments