Index: django/db/backends/util.py
===================================================================
--- django/db/backends/util.py	(revision 7138)
+++ django/db/backends/util.py	(working copy)
@@ -46,7 +46,11 @@
 ###############################################
 
 def typecast_date(s):
-    return s and datetime.date(*map(int, s.split('-'))) or None # returns None if s is null
+    sd = map(int, s.split('-'))
+    if 0 in sd:
+	# 0 is not a valid year, month or day
+	return None # should raise error here ?
+    return s and datetime.date(*sd) or None # returns None if s is null
 
 def typecast_time(s): # does NOT store time zone information
     if not s: return None
