Hi, 2 days passed since I've sent this message to the list, but I
received no replies so far.
As I thought that may be not everybody received it, I resend it one more
time.
I also feel that my message might be unclear, so I also juggest to try
it and give "steps to reproduce" below.
Before this, I would like to emphasize that I'm using linux susse 9.3
here and I did not try this on any other system, but I hope some of you
can shed some light on this problem and -- even better -- offer some
posible solution.
Steps to reproduce:
1. login as a regular user with your own username.
2. create a small file (let's call it import.txt) with some rows similar
to the construct of a table you'll create in the next step.
3. type: sqlite3 test (test being the database).
4. in sqlite3, enter: create table tbl(with appropriate column list);
5. Then enter: .import import.txt tbl in order to insert the rows into
tbl that you wrote in step 2.
6. Enter: select * from tbl; you'll probably see the rows you just
inserted through the file, as expected.
7. enter: delete from tbl; in order to reinsert those lines again next
time.
8. exit sqlite3 (ctrl-d).
9. Now, at the shell command line enter the command to be a super user:
su, ENTER, password (if any, probably there is. (I have this on this
system, since I'm working remotely on a company's computer from home and
it is, of course, multiuser system).
10. Now, invoke again sqlite3 test.
11. enter: .import import.txt tbl
12. Then enter: select * from tbl; this time, at least in my case, I get
nothing, as like the table is empty, although .import did not output any
error.
This is, from my point of view, a very strange and anoying behavior.
Now, if you read on, you'll understand why I need this way of usage.
Yes, I may solve this avoiding use of .import, but this way seems neat
and quicker.
I hope somebody will lead me towards a solution, or at least explain
this strange behavior.
Sorry for the lengthy message, thanks, Rafi.
-----Original Message-----
From: Rafi Cohen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 20, 2007 8:06 PM
To: 'sqlite-users@sqlite.org'
Subject: inv ok i ng sqlite3 command as a superuser


Hi, for various reasons, I preffer to invoke my application as the
superuser.
This, in turn, invokes sqlite3 command to apply a .import command from
file to table.
Although .import does not return any error, the table remains empty.
So, I manually entered to sqlite3 and applied the .import command. Most
surprisingly, as a superuser it does just nothing, as ignored.
But when I do just the same as a regular user, it works with no problem.
So, first, can anybody confirm this or reffer me to other reasons for
this? And second, does anybody have any solution for this? As I said, I
have to run my application as a superuser as it has to open and
communicate with serial ports.
Thanks, Rafi.

Reply via email to