mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-11-04 05:08:57 +08:00 
			
		
		
		
	lmdb: ITS#8109 fix mdb_cursor_del0 on empty DB.
Change-Id: Idba0acfd64b597f2bc5cb847ca99fe4560eed875
This commit is contained in:
		
							
								
								
									
										1
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								CHANGES
									
									
									
									
									
								
							@@ -7,6 +7,7 @@ LMDB 0.9.15 Release Engineering
 | 
			
		||||
	Fix mdb_rebalance collapsing root (ITS#8062)
 | 
			
		||||
	Fix mdb_load with large values (ITS#8066)
 | 
			
		||||
	Fix to retry writes on EINTR (ITS#8106)
 | 
			
		||||
	Fix mdb_cursor_del on empty DB (ITS#8109)
 | 
			
		||||
	Added workaround for fdatasync bug in ext3fs
 | 
			
		||||
	Build
 | 
			
		||||
		Don't use -fPIC for static lib
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								mdb.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								mdb.c
									
									
									
									
									
								
							@@ -8569,6 +8569,13 @@ mdb_cursor_del0(MDB_cursor *mc)
 | 
			
		||||
		MDB_cursor *m2, *m3;
 | 
			
		||||
		MDB_dbi dbi = mc->mc_dbi;
 | 
			
		||||
 | 
			
		||||
		/* DB is totally empty now, just bail out.
 | 
			
		||||
		 * Other cursors adjustments were already done
 | 
			
		||||
		 * by mdb_rebalance and aren't needed here.
 | 
			
		||||
		 */
 | 
			
		||||
		if (!mc->mc_snum)
 | 
			
		||||
			return rc;
 | 
			
		||||
 | 
			
		||||
		mp = mc->mc_pg[mc->mc_top];
 | 
			
		||||
		nkeys = NUMKEYS(mp);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user