bbqchickenrobot / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

The shell expects the database name in the second argument, not the first #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the shell project by passing the database name in the first 
argument.

What is the expected output? What do you see instead?
When passing as a first argument the database name, the shell should write 
on the file system, instead it writes in memory.

What version of the product are you using? On what operating system?
Latest release on Windows 7 RC1.

Please provide any additional information below.
Inside the shell.cs (line 2554) :

for ( i = 1 ; i < argc - 1 ; i++ )
...
      if ( i < argc )
      {
#if (SQLITE_OS_OS2) && SQLITE_OS_OS2
data.zDbFilename = (string )convertCpPathToUtf8( argv[i++] );
#else
        data.zDbFilename = argv[i++];
#endif
      }
      else
      {
#if !SQLITE_OMIT_MEMORYDB
        data.zDbFilename = ":memory:";
#else
data.zDbFilename = 0;
#endif
      }

A command like "C#-SQLite3.exe mydb.sqlite" will compare 1 < 1 and pass in 
the else branch.

Original issue reported on code.google.com by pierrick...@gmail.com on 9 Aug 2009 at 4:12

GoogleCodeExporter commented 9 years ago
Fixed, good catch.

Watch for patch set posted later today on 8/10

Original comment by noah.hart@gmail.com on 10 Aug 2009 at 12:56