Re: [sqlite] sqlite3_table_column_metadata with nil parameters bug ?

2016-11-02 Thread Richard Hipp
On 11/2/16, LacaK  wrote:
> Hi *,
>
> when I pass to sqlite3_table_column_metadata() function 2,3,4 parameters
> as null i receive SIGSEGV.
> Is this expected behavior ?

Yes.  The interface requires a non-NULL value for the 3rd parameter.
(The 2nd and 4th parameters may be NULL.)

If you want to avoid a crash in this scenario, then recompile using
-DSQLITE_ENABLE_API_ARMOR and you will get an SQLITE_MISUSE error when
invoking sqlite3_table_column_metadata() with a NULL tablename
parameter.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite3_table_column_metadata with nil parameters bug ?

2016-11-02 Thread LacaK

Hi *,

when I pass to sqlite3_table_column_metadata() function 2,3,4 parameters 
as null i receive SIGSEGV.

Is this expected behavior ?

I understand that it does not give big sense call this function with all 
null parameters, but when I use in generic case as 2,3,4 parameters:


sqlite3_column_database_name(),
sqlite3_column_table_name(),
sqlite3_column_origin_name()

and I have in SQL SELECT function for example : "lower(a) AS a", then 
all 3 above mentioned function returns null and call to 
sqlite3_table_column_metadata() generates SIGSEGV.


IMO such situation should be handled?

Thanks

-Laco.

P.S. I use SQLite 3.14.2
(resend to sqlite-users@mailinglists.sqlite.org)
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_table_column_metadata????

2006-11-13 Thread Trevor Talbot

On 11/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


if(sqlite3_table_column_metadata(handle,"temp.db",


"temp.db" should be either "main" or NULL.  It's used to identify
ATTACHed databases (by alias).

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] sqlite3_table_column_metadata????

2006-11-13 Thread ravi.karatagi

HI All,
Below is the code.
get_table_data() is giving the expected values.Where as I am not able
get meta info of the same.

sqlite3 *handle;
char *errmsg;
const char *datatype;
const char *colseq;
intNotNull,PrimaryKey,Autoinc;
const char *err;
   

   
if(sqlite3_open("temp.db",)==SQLITE_OK)

{
sqlite3_exec(handle,"create table person (integer pid,text
name)",NULL,0,);
sqlite3_exec(handle,"insert into person
values(1,\"Ravi\")",NULL,0,);
sqlite3_exec(handle,"insert into person
values(2,\"Anand\")",NULL,0,);
sqlite3_exec(handle,"insert into person
values(3,\"Sujit\")",NULL,0,);
if(sqlite3_table_column_metadata(handle,"temp.db",

"person","pid",)==SQLITE_
OK)
cout<<"Success";
else

err=sqlite3_errmsg(handle);

Regards,
Ravi K

-Original Message-
From: Glenn [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 12, 2006 9:16 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] sqlite3_table_column_metadata

[EMAIL PROTECTED] wrote:
> Hi All,
>
> The function sqlite3_table_column_metadata() is giving the
> error message "No such TableName.ColName" even if I pass correct table
> name and col name
>
> (All the parameters are correct).
>
> Is there any problem with the API or Any extra care needs to be Taken?
> 
> Please let me Know ASAP. I am totally struck

Providing your code which is calling sqlite3_table_column_metadata()
would help.  Just saying that you are calling it correctly doesn't give
anyone a place to investigate; if you are calling everything correctly
then it should work.

--
Glenn McAllister <[EMAIL PROTECTED]>  +1 416 348 1594
SOMA Networks, Inc.  http://www.somanetworks.com/  +1 416 977 1414


-
To unsubscribe, send email to [EMAIL PROTECTED]

-



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sqlite3_table_column_metadata????

2006-11-12 Thread Glenn

[EMAIL PROTECTED] wrote:

Hi All,

The function sqlite3_table_column_metadata() is giving the
error message "No such TableName.ColName" even if I pass correct table
name and col name

(All the parameters are correct).

Is there any problem with the API or Any extra care needs to be Taken?
 
Please let me Know ASAP. I am totally struck


Providing your code which is calling sqlite3_table_column_metadata() 
would help.  Just saying that you are calling it correctly doesn't give 
anyone a place to investigate; if you are calling everything correctly 
then it should work.


--
Glenn McAllister <[EMAIL PROTECTED]>  +1 416 348 1594
SOMA Networks, Inc.  http://www.somanetworks.com/  +1 416 977 1414

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] sqlite3_table_column_metadata????

2006-11-12 Thread ravi.karatagi

Hi All,

The function sqlite3_table_column_metadata() is giving the
error message "No such TableName.ColName" even if I pass correct table
name and col name

(All the parameters are correct).

Is there any problem with the API or Any extra care needs to be Taken?



Please let me Know ASAP. I am totally struck



Regards,

Ravi K






The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com