Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FbDataReader fails when reading more than 110 fields [DNET217] #226

Closed
firebird-automations opened this issue Feb 28, 2009 · 4 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: Gareth Goslett (gareth)

Relate to DNET260

When executing this unit test which creates a table with 500 fields an exception is generated when executing a select command for all fields.

[Test]
public void MaxFieldsTest()
{
FbCommand command;
FbDataReader reader;
System.Text.StringBuilder sb = new System.Text.StringBuilder();

sb\.AppendLine\("CREATE TABLE TEST\_MAX\_FIELDS \("\);
for \(int i = 0; i < 499; i\+\+\)
\{
	sb\.AppendLine\("FIELD\_" \+ i\.ToString\("D3"\) \+ " INTEGER,"\);
\}
sb\.AppendLine\("FIELD\_499 INTEGER\)"\);

command = new FbCommand\(sb\.ToString\(\), this\.Connection\);
command\.ExecuteNonQuery\(\);
command\.Dispose\(\);

command = new FbCommand\("SELECT \* FROM TEST\_MAX\_FIELDS", this\.Connection\);
reader = command\.ExecuteReader\(\);
reader\.Close\(\);

}

Selected test: FirebirdSql.Data.UnitTests.FbDataReaderTest.MaxFieldsTest
.F
Tests run: 1, Failures: 1, Not run: 0, Time: 1.770 seconds

Test Case Failures:
1) FirebirdSql.Data.UnitTests.FbDataReaderTest.MaxFieldsTest : System.IndexOutOfRangeException : Index was outside the bounds of the array.
at FirebirdSql.Data.Common.IscHelper.VaxInteger(Byte[] buffer, Int32 index, Int32 length) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\Common\IscHelper.cs:line 312
at FirebirdSql.Data.Client.Managed.Version10.GdsStatement.ParseTruncSqlInfo(Byte[] info, Descriptor& rowDesc, Int32& lastIndex, Int32& currentPosition) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\Client\Managed\Version10\GdsStatement.cs:line 722
at FirebirdSql.Data.Client.Managed.Version10.GdsStatement.ParseSqlInfo(Byte[] info, Byte[] items, Int32& lastPosition) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\Client\Managed\Version10\GdsStatement.cs:line 698
at FirebirdSql.Data.Client.Managed.Version10.GdsStatement.ProcessPrepareResponse(GenericResponse response) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\Client\Managed\Version10\GdsStatement.cs:line 465
at FirebirdSql.Data.Client.Managed.Version11.GdsStatement.Prepare(String commandText) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\Client\Managed\Version11\GdsStatement.cs:line 81
at FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbCommand.cs:line 1153
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbCommand.cs:line 1175
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior) in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbCommand.cs:line 552
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader() in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbCommand.cs:line 529
at FirebirdSql.Data.UnitTests.FbDataReaderTest.MaxFieldsTest() in d:\Projects\SqlManager\FirebirdClient\NETProvider\source\FirebirdSql\Data\UnitTests\FbDataReaderTest.cs:line 394

Commits: 175db54 bd8b230

@firebird-automations
Copy link
Author

Modified by: @cincuranet

priority: Minor [ 4 ] => Critical [ 2 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.0 Beta 2 [ 10340 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue relate to DNET260 [ DNET260 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants