Index: src/NHibernate.Test/SqlTest/Custom/CustomStoredProcSupportTest.cs
===================================================================
--- src/NHibernate.Test/SqlTest/Custom/CustomStoredProcSupportTest.cs	(revision 5185)
+++ src/NHibernate.Test/SqlTest/Custom/CustomStoredProcSupportTest.cs	(working copy)
@@ -17,6 +17,22 @@
 			Assert.AreEqual(o[0], "getAll");
 			Assert.AreEqual(o[1], 43L);
 			s.Close();
+		}	
+		
+		[Test]
+		public void TwoResultsStoredProcedure()
+		{
+			ISession s = OpenSession();
+			IQuery namedQuery = s.GetNamedQuery("twoResults");
+			namedQuery.SetInt64("number", 43L);
+			IList list = namedQuery.List();
+			object[] a = (object[])list[0];
+			Assert.AreEqual(a[0], "getAll");
+			Assert.AreEqual(a[1], 43L);
+			object[] b = (object[])list[1];
+			Assert.AreEqual(b[0], 44L);
+			Assert.AreEqual(b[1], "Oh my");
+			s.Close();
 		}
 
 		[Test]
Index: src/NHibernate.Test/SqlTest/Custom/MsSQL/MSSQLEmployment.hbm.xml
===================================================================
--- src/NHibernate.Test/SqlTest/Custom/MsSQL/MSSQLEmployment.hbm.xml	(revision 5185)
+++ src/NHibernate.Test/SqlTest/Custom/MsSQL/MSSQLEmployment.hbm.xml	(working copy)
@@ -155,6 +155,12 @@
 		<return-scalar column="value" type="long"/>
 		exec simpleScalar :number
 	</sql-query>
+	
+	<sql-query name="twoResults">
+		<return-scalar column="name" type="string"/>
+		<return-scalar column="value" type="long"/>
+		exec twoResults :number
+	</sql-query>
 
 	<sql-query name="paramhandling">
 		<return-scalar column="value" type="long"/>
@@ -216,6 +222,17 @@
 		<drop>
 			DROP PROCEDURE simpleScalar
 		</drop>
+	</database-object>	
+	
+	<database-object>
+		<create>
+			CREATE PROCEDURE twoResults @number int AS
+			SELECT @number as value, 'getAll' as name;
+			SELECT @number + 1 as value, 'Oh my' as phrase
+		</create>
+		<drop>
+			DROP PROCEDURE twoResults
+		</drop>
 	</database-object>
 
 </hibernate-mapping>
Index: src/NHibernate/Loader/Custom/CustomLoader.cs
===================================================================
--- src/NHibernate/Loader/Custom/CustomLoader.cs	(revision 5185)
+++ src/NHibernate/Loader/Custom/CustomLoader.cs	(working copy)
@@ -1,3 +1,4 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Data;
@@ -378,16 +379,43 @@
 					// build an array with indices equal to the total number
 					// of actual returns in the result Hibernate will return
 					// for this query (scalars + non-scalars)
-					resultRow = new object[columnProcessors.Length];
-					for (int i = 0; i < columnProcessors.Length; i++)
+					try
 					{
-						resultRow[i] = columnProcessors[i].Extract(data, resultSet, session);
+						resultRow = BuildResultRow_(data, resultSet, session);
 					}
+					catch (IndexOutOfRangeException e)
+					{
+						RediscoverTypes(resultSet);
+						resultRow = BuildResultRow_(data, resultSet, session);
+					}
 				}
 
 				return (hasTransformer) ? resultRow : (resultRow.Length == 1) ? resultRow[0] : resultRow;
 			}
 
+			private void RediscoverTypes(IDataReader resultSet)
+			{
+				columnProcessors = null;
+				var metaData = new MetaData(resultSet);
+				List<string> aliases = new List<string>();
+				List<IType> types = new List<IType>();
+				PrepareForAutoDiscovery(metaData);
+				foreach (IResultColumnProcessor columnProcessor in ColumnProcessors)
+				{
+					columnProcessor.PerformDiscovery(metaData, types, aliases);
+				}
+			}
+
+			private object[] BuildResultRow_(object[] data, IDataReader resultSet, ISessionImplementor session)
+			{
+				var resultRow = new object[columnProcessors.Length];
+				for (int i = 0; i < columnProcessors.Length; i++)
+				{
+					resultRow[i] = columnProcessors[i].Extract(data, resultSet, session);
+				}
+				return resultRow;
+			}
+
 			public void PrepareForAutoDiscovery(MetaData metadata)
 			{
 				if (columnProcessors == null || columnProcessors.Length == 0)
Index: src/NHibernate/Loader/Loader.cs
===================================================================
--- src/NHibernate/Loader/Loader.cs	(revision 5185)
+++ src/NHibernate/Loader/Loader.cs	(working copy)
@@ -415,37 +415,41 @@
 
 			try
 			{
-				HandleEmptyCollections(queryParameters.CollectionKeys, rs, session);
-				EntityKey[] keys = new EntityKey[entitySpan]; // we can reuse it each time
-
-				if (log.IsDebugEnabled)
+				do
 				{
-					log.Debug("processing result set");
-				}
+					HandleEmptyCollections(queryParameters.CollectionKeys, rs, session);
+					EntityKey[] keys = new EntityKey[entitySpan]; // we can reuse it each time
 
-				int count;
-				for (count = 0; count < maxRows && rs.Read(); count++)
-				{
 					if (log.IsDebugEnabled)
 					{
-						log.Debug("result set row: " + count);
+						log.Debug("processing result set");
 					}
 
-					object result = GetRowFromResultSet(rs, session, queryParameters, lockModeArray, optionalObjectKey, hydratedObjects,
-					                                    keys, returnProxies);
-					results.Add(result);
+					int count;
+					for (count = 0; count < maxRows && rs.Read(); count++)
+					{
+						if (log.IsDebugEnabled)
+						{
+							log.Debug("result set row: " + count);
+						}
 
-					if (createSubselects)
+						object result = GetRowFromResultSet(rs, session, queryParameters, lockModeArray, optionalObjectKey,
+						                                    hydratedObjects,
+						                                    keys, returnProxies);
+						results.Add(result);
+
+						if (createSubselects)
+						{
+							subselectResultKeys.Add(keys);
+							keys = new EntityKey[entitySpan]; //can't reuse in this case
+						}
+					}
+
+					if (log.IsDebugEnabled)
 					{
-						subselectResultKeys.Add(keys);
-						keys = new EntityKey[entitySpan]; //can't reuse in this case
+						log.Debug(string.Format("done processing result set ({0} rows)", count));
 					}
-				}
-
-				if (log.IsDebugEnabled)
-				{
-					log.Debug(string.Format("done processing result set ({0} rows)", count));
-				}
+				} while (rs.NextResult());
 			}
 			catch (Exception e)
 			{
