Merge pull request #5155 from tianhe1986/develop_count_ignore_limit

Fix CI_DB_query_builder::count_all_results() returning wrong count with LIMIT/OFFSET
diff --git a/tests/codeigniter/database/query_builder/count_test.php b/tests/codeigniter/database/query_builder/count_test.php
index 90ac528..da312d8 100644
--- a/tests/codeigniter/database/query_builder/count_test.php
+++ b/tests/codeigniter/database/query_builder/count_test.php
@@ -35,4 +35,14 @@
 		$this->assertEquals(2, $this->db->like('name', 'ian')->count_all_results('job'));
 	}
 
+	// ------------------------------------------------------------------------
+
+	/**
+	 * @see ./mocks/schema/skeleton.php
+	 */
+	public function test_count_all_results_limit()
+	{
+		$this->assertEquals(1, $this->db->like('name', 'ian')->limit(1)->count_all_results('job'));
+	}
+
 }
\ No newline at end of file