mirror of
				https://github.com/django/django.git
				synced 2025-11-04 05:35:37 +00:00 
			
		
		
		
	Fixed DatabaseFeatures.has_select_for_update_nowait on MariaDB 10.3+.
Thanks Kola Erinoso for the report.
This commit is contained in:
		
							parent
							
								
									b9fe7f9294
								
							
						
					
					
						commit
						a20ea33ca6
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -111,7 +111,11 @@ class DatabaseFeatures(BaseDatabaseFeatures):
 | 
				
			||||||
    def has_select_for_update_skip_locked(self):
 | 
					    def has_select_for_update_skip_locked(self):
 | 
				
			||||||
        return not self.connection.mysql_is_mariadb and self.connection.mysql_version >= (8, 0, 1)
 | 
					        return not self.connection.mysql_is_mariadb and self.connection.mysql_version >= (8, 0, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    has_select_for_update_nowait = property(operator.attrgetter('has_select_for_update_skip_locked'))
 | 
					    @cached_property
 | 
				
			||||||
 | 
					    def has_select_for_update_nowait(self):
 | 
				
			||||||
 | 
					        if self.connection.mysql_is_mariadb:
 | 
				
			||||||
 | 
					            return self.connection.mysql_version >= (10, 3, 0)
 | 
				
			||||||
 | 
					        return self.connection.mysql_version >= (8, 0, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @cached_property
 | 
					    @cached_property
 | 
				
			||||||
    def needs_explain_extended(self):
 | 
					    def needs_explain_extended(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue