C++ Connect Installation

2011-03-05 Thread Ruben Safir
Hello

I'm trying to install the C++ connector as outlined on this URL:

http://dev.mysql.com/tech-resources/articles/mysql-connector-cpp.html#install

and it fails misserably.

I have installed  5.5.0-m2 Source distribution

It fails right away on the make after doing the cmake

[  1%] Building CXX object
driver/CMakeFiles/mysqlcppconn.dir/mysql_art_resultset.o
/home/ruben/src/mysql-connector-c++-1.0.5/driver/mysql_art_resultset.cpp:
In member function ‘std::string sql::mysql::MyVal::getString()’:
/home/ruben/src/mysql-connector-c++-1.0.5/driver/mysql_art_resultset.cpp:57:
error: ‘snprintf’ was not declared in this scope
/home/ruben/src/mysql-connector-c++-1.0.5/driver/mysql_art_resultset.cpp:63:
error: ‘snprintf’ was not declared in this scope
/home/ruben/src/mysql-connector-c++-1.0.5/driver/mysql_art_resultset.cpp:69:
error: ‘snprintf’ was not declared in this scope
/home/ruben/src/mysql-connector-c++-1.0.5/driver/mysql_art_resultset.cpp:75:
error: ‘snprintf’ was not declared in this scope
make[2]: *** [driver/CMakeFiles/mysqlcppconn.dir/mysql_art_resultset.o]
Error 1
make[1]: *** [driver/CMakeFiles/mysqlcppconn.dir/all] Error 2


I'm obviously clueless about what to do.

Ruben
-- 
http://www.mrbrklyn.com - Interesting Stuff
http://www.nylxs.com - Leadership Development in Free Software

So many immigrant groups have swept through our town that Brooklyn, like 
Atlantis, reaches mythological proportions in the mind of the world  - RI Safir 
1998

http://fairuse.nylxs.com  DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002

"Yeah - I write Free Software...so SUE ME"

"The tremendous problem we face is that we are becoming sharecroppers to our 
own cultural heritage -- we need the ability to participate in our own society."

"> I'm an engineer. I choose the best tool for the job, politics be damned.<
You must be a stupid engineer then, because politcs and technology have been 
attached at the hip since the 1st dynasty in Ancient Egypt.  I guess you missed 
that one."

© Copyright for the Digital Millennium

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



C++ API

2011-03-06 Thread Ruben Safir
OK - I see there is more than one C++ API for MYSQL.  Which one would
someone recommend and why?

Ruben
-- 
http://www.mrbrklyn.com - Interesting Stuff
http://www.nylxs.com - Leadership Development in Free Software

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: MySQL dying?

2014-11-22 Thread Ruben Safir
On Wed, Dec 05, 2012 at 12:41:09PM +0100, Johan De Meersman wrote:
> - Original Message -
> > From: "Anthony Pace" 
> > 
> > I have heard that due to Oracle taking over, the OS community is
> > shifting to other type of DB's .
> 
> I think the question has long been answered. However, out of curiosity (and 
> because they are the questions you should ask yourself anyway), *who* have 
> you heard that from, and what might they not have told you? :-)
> 
> I can imagine there's zealots from pretty much every database that will be 
> claiming similar things about every project they see as a competitor to be 
> stamped out. Hell, Monty himself has been scaremongering plenty around the 
> time Oracle announced the takeover.
> 
> 

And for damn good reason.  And looking back, it is hard to believe that
this was almost true a mear 2 years ago.  We are in one of the most
rapid rivers of change I'd ever experienced, and most of the change is
not good, not good at all...starting with Oracle buying Sun and Mysql


> 
> -- 
> Linux Bier Wanderung 2012, now also available in Belgium!
> August, 12 to 19, Diksmuide, Belgium - http://lbw2012.tuxera.be
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: MySQL dying?

2014-11-24 Thread Ruben Safir
On Sun, Nov 23, 2014 at 08:31:24PM +0100, Heck, Walter wrote:
> I watched a keynote from Thomas Ulin at Percona Live London a few weeks
> back, and the slides are quite interesting:
> https://www.percona.com/live/london-2014/sites/default/files/slides/PerconaLondon14_keynote.pdf
> 


Well, this mailing list is dead.  This is a mailing list that used to
handle 70+ questions a day, or more.

Ruben

> There's a lot of haters (some with more valid reasons to hate, others with
> little or no reason), but it cannot be denied that Oracle did not let MySQL
> die..
> 
> cheers,
> 
> On Sun, Nov 23, 2014 at 7:08 AM, Ruben Safir  wrote:
> 
> > On Wed, Dec 05, 2012 at 12:41:09PM +0100, Johan De Meersman wrote:
> > > - Original Message -
> > > > From: "Anthony Pace" 
> > > >
> > > > I have heard that due to Oracle taking over, the OS community is
> > > > shifting to other type of DB's .
> > >
> > > I think the question has long been answered. However, out of curiosity
> > (and because they are the questions you should ask yourself anyway), *who*
> > have you heard that from, and what might they not have told you? :-)
> > >
> > > I can imagine there's zealots from pretty much every database that will
> > be claiming similar things about every project they see as a competitor to
> > be stamped out. Hell, Monty himself has been scaremongering plenty around
> > the time Oracle announced the takeover.
> > >
> > >
> >
> > And for damn good reason.  And looking back, it is hard to believe that
> > this was almost true a mear 2 years ago.  We are in one of the most
> > rapid rivers of change I'd ever experienced, and most of the change is
> > not good, not good at all...starting with Oracle buying Sun and Mysql
> >
> >
> > >
> > > --
> > > Linux Bier Wanderung 2012, now also available in Belgium!
> > > August, 12 to 19, Diksmuide, Belgium - http://lbw2012.tuxera.be
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:http://lists.mysql.com/mysql
> >
> > --
> > So many immigrant groups have swept through our town
> > that Brooklyn, like Atlantis, reaches mythological
> > proportions in the mind of the world - RI Safir 1998
> > http://www.mrbrklyn.com
> >
> > DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> > http://www.nylxs.com - Leadership Development in Free Software
> > http://www2.mrbrklyn.com/resources - Unpublished Archive
> > http://www.coinhangout.com - coins!
> > http://www.brooklyn-living.com
> >
> > Being so tracked is for FARM ANIMALS and and extermination camps,
> > but incompatible with living as a free human being. -RI Safir 2013
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:http://lists.mysql.com/mysql
> >
> >
> 
> 
> -- 
> Best regards,
> 
> Walter Heck
> CEO / Founder OlinData <http://olindata.com/?src=wh_gapp> - Open Source
> Training & Consulting
> 
> Check out our upcoming trainings <http://olindata.com/training/upcoming>

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: MySQL dying?

2014-11-24 Thread Ruben Safir
On 11/24/2014 10:00 AM, Johan De Meersman wrote:
> 
> - Original Message -
>> From: "Ruben Safir" 
>> Subject: Re: MySQL dying?
>>
>> Well, this mailing list is dead.  This is a mailing list that used to
>> handle 70+ questions a day, or more.
> 
> 
> Is that why you feel the need to troll on posts from two years ago?
> 
> If you think it's dead, unsubscribe and go install MSSQL. If not, either ask 
> a question or stop wasting bandwidth.
> 
> 
> Bye now.
> 


No, but I thought it was interesting to see what has happened within the
last 2 years.  Its not an issue of trolling.  But perhaps Oracle could
have learned something from the MYSQL community, which it seems to have
failed to.  If you find that this post was troll, then you've more than
missed the point, you missed the entire boat.

Bandwidth?  This list no longer produces bandwidth...  It has been
abandoned.  What would you have done in those days when we handled so
much mail in this list that there was no time to answer trolls... the
real trolls?

You have a bad attitude man, and it sucks.

Now, back to business..

Ruben

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: MySQL dying?

2014-11-24 Thread Ruben Safir
On 11/24/2014 12:19 PM, Johan De Meersman wrote:
> 
> 
> - Original Message -
>> From: "Ruben Safir" 
>> Subject: Re: MySQL dying?
> 
>> abandoned.  What would you have done in those days when we handled so
>> much mail in this list that there was no time to answer trolls... the
>> real trolls?
> 
> "We"? You mean the two mails you sent back in 2011 trying to figure out how 
> to install the C++ connector?
> 
> *plonk*
> 
> 

/dev/null


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: MySQL dying?

2014-11-24 Thread Ruben Safir
On 11/24/2014 12:19 PM, Johan De Meersman wrote:
> 
> 
> - Original Message -
>> From: "Ruben Safir" 
>> Subject: Re: MySQL dying?
> 
>> abandoned.  What would you have done in those days when we handled so
>> much mail in this list that there was no time to answer trolls... the
>> real trolls?
> 
> "We"? You mean the two mails you sent back in 2011 trying to figure out how 
> to install the C++ connector?
> 
> *plonk*
> 
> 

where were you in 2000, youngerman?

plonk is correct.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: forum vs email

2014-12-17 Thread Ruben Safir

they are no indexing usenet any longer which is a real problem because
of volumns of archival information on them from everything from SQL
theory to networking commands.

It is depressing 

almost as depressing as the university library with stacks of books on
the floors pushed away to make room for computer terminals.

Ruben



On Thu, Dec 11, 2014 at 09:23:02AM +, Mark Goodge wrote:
> On 10/12/2014 23:40, Reindl Harald wrote:
> >
> >Am 10.12.2014 um 18:38 schrieb h...@tbbs.net:
> >>2014/12/10 09:00 +0100, Johan De Meersman 
> >> One of the (for me, at least) defining features of a forum, is
> >>that the subjects tend to be divided up into a tree structure, which
> >>has it's own benefits 
> >>
> >>Something more sophisticated than grouping messages by trimmed
> >>subject-lines?
> >>maybe involving such header lines as were used in the old netnews (if
> >>e-mail is part of it)?
> >
> >every sane MUA supports threading
> >see attached screenshot
> 
> Indeed. That, to me, is one of the key arguments in favour of a
> mailing list: people can choose how to view the list according to
> their own preference (some like it threaded, others prefer a flat
> view based simply on message date). Other arguments in favour of
> email include:
> 
> * Email is a push medium. I don't have to continually re-check a
> website to see if there's any new messages, they simply arrive in my
> list mailbox and I view them at my convenience.
> 
> * Individual emails can be forwarded and/or saved independently of
> the others.
> 
> * Email gives me a local archive of messages in addition to any
> central archive.
> 
> having said that, I think that web-based archives of mailing lists
> can be very useful, particularly for a public list where the archive
> is open to search engines. That makes them a valuable historical
> resource as well as merely a for-the-moment discussion forum. And,
> if you're going to have a web-based archive, it isn't a huge step
> from there to add the ability to post to the list via the web as
> well. That can be helpful for people on corporate email systems who
> don't easily have the ability to subscribe to a list (or filter mail
> from it into a separate folder), as well as people who only need to
> contribute very infrequently and don't want to have to subscribe in
> order to do so. But all this should, IMO, be in addition to the core
> features of an email mailing list, rather than a replacement for
> them.
> 
> Mark
> 
> -- 
> http://www.markgoodge.uk
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: ssh basics

2015-03-08 Thread Ruben Safir
On Sun, Mar 08, 2015 at 12:20:10PM +, Thufir wrote:
> On Sun, 08 Mar 2015 10:47:17 +0100, Reindl Harald wrote:
> 
> 
> > oh my god... https://www.google.at/search?q=ssh+tunnel
> 


Yah know ssh and mysql wasn't invented 20 minutes ago.  They are basic
tools for GNU users for almost 2 decade so get off your ass and go look
this up, or ask the question in the porper location at least.

Or better, find a local user group, get off your damn cellphone, and get
some obviously much needed mentoring in GNU/Linux basics.


gmail sucks


> 
> hmm, are you thinking that I'm not using ssh?  Because I'm using ssh 
> currently, and it works fine.  
> 
> How is ssh -L 3305:localhost:3306 thufir@192.168.1.3  any better or more 
> useful than ssh thufir@192.168.1.3 ?
> 
> 
> The process described here:
> 
> http://quintagroup.com/services/support/tutorials/mysql-linux
> 
> doesn't seem demonstratively better, or even different, than just using 
> ssh to login, and then logging into MySQL.  However, I've seen that 
> approach mentioned quite a bit.
> 
> What's the advantage?
> 
> 
> 
> thanks,
> 
> Thufir
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: ssh basics

2015-03-08 Thread Ruben Safir
On Sun, Mar 08, 2015 at 08:03:05PM +, Thufir wrote:
> On Sun, 08 Mar 2015 08:43:41 -0400, Ruben Safir wrote:
> 
> 
> > gmail sucks
> 
> 
> You prefer yahoo mail?  Just curious.
> 

Your not curious.


> 
> -Thufir
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Enum Columns

2003-04-01 Thread Ruben Safir
I has a column defined as 
enum not null (percent,absolute) default value percent (in psuedocode)
and I was able to update a record which filled it either with a NULL or
an empty string.

How does this happen?  the value should be either percent or absolute,
or the update should just fail.


Ruben

-- 
__
Brooklyn Linux Solutions
__
DRM is THEFT - We are the STAKEHOLDERS http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn

1-718-382-0585

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL & mail servers

2003-04-01 Thread Ruben Safir
Well


To do selects on your mail archive?

BTW - I've heard that Linux Magazine has developed into a handsom
rag.  Congradulations.  I would never had thought it after seeing the
first issue.

Ruben

On Tue, Apr 01, 2003 at 01:15:00PM -0800, Jeremy Zawodny wrote:
> On Tue, Apr 01, 2003 at 01:04:59PM -0800, Steven Nakhla wrote:
> >
> > Are there currently any open-source mail servers that utilize MySQL?
> 
> Yes, many.
> 
> > I know that there are some that will authenticate against accounts
> > stored in a MySQL database, but I am looking for a mail server that
> > actually stores the messages in the database.
> 
> Why, exactly?
> 
> Jeremy
> -- 
> Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
> <[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/
> 
> MySQL 4.0.8: up 57 days, processed 1,928,444,836 queries (388/sec. avg)
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
__
Brooklyn Linux Solutions
__
DRM is THEFT - We are the STAKEHOLDERS http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn

1-718-382-0585

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Checking for live connections

2004-09-14 Thread Ruben Safir Secretary NYLXS
Is there a way of checking for live connections prior to using
mysql_connect in the C API (asside from mysql_ping)

Ruben   
-- 
__
Brooklyn Linux Solutions

So many immigrant groups have swept through our town 
that Brooklyn, like Atlantis, reaches mythological 
proportions in the mind of the world  - RI Safir 1998

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: RETURNED MAIL: DATA FORMAT ERROR

2004-09-14 Thread Ruben Safir Secretary NYLXS
What is this?

On Tue, Sep 14, 2004 at 10:28:53AM +0200, [EMAIL PROTECTED] wrote:
> Your message was undeliverable due to the following reason(s):
> 
> Your message could not be delivered because the destination computer was
> not reachable within the allowed queue period. The amount of time
> a message is queued before it is returned depends on local configura-
> tion parameters.
> 
> Most likely there is a network problem that prevented delivery, but
> it is also possible that the computer is turned off, or does not
> have a mail system running right now.
> 
> Your message was not delivered within 8 days:
> Host 207.96.21.225 is not responding.
> 
> The following recipients could not receive this message:
> <[EMAIL PROTECTED]>
> 
> Please reply to [EMAIL PROTECTED]
> if you feel this message to be in error.
> 
> 

> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
__
Brooklyn Linux Solutions

So many immigrant groups have swept through our town 
that Brooklyn, like Atlantis, reaches mythological 
proportions in the mind of the world  - RI Safir 1998

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL Databases in Subdirectories?

2004-10-07 Thread Ruben Safir Secretary NYLXS
How does that help?  The database itself should be allowed to organize 
everything.

Ruben


On Thu, Oct 07, 2004 at 04:57:39PM -0700, Justin Smith wrote:
> Is it possible to create a database in a lower-level subdirectory of 
> MySQL's data directory?  We have almost 100,000 sites, and we would like 
> to have a separate database for each site.  However, it's very 
> impractical from a filesystem maintenance standpoint to have 100,000 
> subdirectories of MySQL's data directory.  What we would like to do is 
> break up the directories into something like this:
> 
> for site #12345:
> 
> [mysql datadir]/01/23/45/[databasename]
> 
> This would greatly improve the manageability of the table space.
> 
> Is this possible?
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
__
Brooklyn Linux Solutions

So many immigrant groups have swept through our town 
that Brooklyn, like Atlantis, reaches mythological 
proportions in the mind of the world  - RI Safir 1998

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Comparing Tables

2004-10-07 Thread Ruben Safir Secretary NYLXS
see IS NOT

On Thu, Oct 07, 2004 at 07:22:23PM -0700, Jason Williard wrote:
> I know that it is possible to do this, though I don't know how.  
> 
> I have 2 tables containing information about trouble tickets.  One of the tables 
> (table2) contains information about every ticket ever received, including tickets 
> that were deleted from the system.  For this reason, table2 has ~450,000 records 
> where table1, which holds the good tickets, has only ~4500.  I would like to clear 
> the useless data out of table2, but don't want to run 450,000 queries to compare 
> them one row at a time.  The two tables share a common id, though one is referred to 
> as tickid while the other is referred to as ticketidchar.
> 
> Is there an easy way, using just a few queries, to select all the rows in table2 
> where ticketidchar does not exist in table1?
> 
> Thank You,
> Jason
-- 
__
Brooklyn Linux Solutions

So many immigrant groups have swept through our town 
that Brooklyn, like Atlantis, reaches mythological 
proportions in the mind of the world  - RI Safir 1998

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Help needed with MySQL C API-based client (segfault)

2004-09-04 Thread Ruben Safir Secretary NYLXS
On Fri, Sep 19, 2003 at 09:18:22AM +0500, Vikram Vaswani wrote:
> Hello,
> 
> I need to write a simple C client for a project. I am using the MySQL C
> API. Attached is the code. It occassionally segfaults with no visible
> pattern. Could someone help me figure out why? Or any other comments on the
> code to help me make it better?

You know, I used to read this mailing list religiously before it became
flooded with W32 questions and PHP users.  And I've stay susbscribed 
but I haven't posted to it in many many months.  iIn fact, I didn't notice
I wasn't any longer subscribed.   So I'm writing this application in C 
and GTK and I was thinking, it's finally time to learn to write some MYSQL 
C API stuff.

I've written a lot of Oracle C programs in years past.  And now I'm looking 
at the C API stuff and wow, it is not readly understandable.  I open up
the mysql mail file with mutt, and bang, this is on the top!

I was going to ask the list if anyone has an exmaple of the basic needs
for a MYSQL program which makes a connection, sends a querry.  Checks the
potention errors, and maps the most basic column types to C types.

The docs say to look at examples in the source directory, but those 
aren't yet clear to me to understand.


Ruben

> 
> /* client.c */
> 
> #include 
> #include 
> 
> int main()
> {
> /* declare
> structures and variables */
>   char query[255];
>   int i, j, count;
> 
> MYSQL mysql;
> MYSQL_RES *result;
> MYSQL_ROW row;
>   MYSQL_FIELD
> *field;
> 
> /* initialize MYSQL structure */
> 
> mysql_init(&mysql);
> 
> /* connect to database */
> if
> (!(mysql_real_connect(&mysql, NULL, "root", "", "db1", 0, NULL, 0)))
> 
>  {
> fprintf(stderr, "Error in connection: %s\n",
> mysql_error(&mysql));
> }
> 
> for( ;; )
>   {
> 
> printf("query? ");
>   gets(query);
>   if (strcmp(query,"exit")
> == 0) 
>   {
>   break;
>   }
> 
>   /* execute query
> */
>   /* if error, display error message */
>   /* else check the type of
> query and handle appropriately */
>   if (mysql_query(&mysql, query) != 0)
> 
> {
>   fprintf(stderr, "Error in query: %s\n", mysql_error(&mysql));
>   }
> 
> else
>   {
>   if (result = mysql_store_result(&mysql))
>   {
>   /* SELECT
> query */
>   /* retrieve result set */
>   int numRecords =
> mysql_num_rows(result);
>   int numFields = mysql_num_fields(result);
> 
> for (i = 0; i < numRecords; i++)
>   {
>   row =
> mysql_fetch_row(result);
> 
>   for (j = 0; j < numFields; j++)
>   {
> 
> //field= mysql_fetch_field(result);
>   fprintf(stdout, "%s", row[j]);
> 
>   j != (numFields-1) ? printf(", ") : printf("\n");
>   }
>   }
> 
> fprintf(stdout, "** Query successful, %d rows retrieved **\n",
> numRecords);
>   }
>   else
>   {
>   if (mysql_field_count(&mysql) == 0)
> 
> {
>   /* non-SELECT query */
>   fprintf(stdout, "** Query successful, %d
> rows affected **\n", mysql_affected_rows(&mysql));
>   }
>   else
>   {
> 
>   fprintf(stderr, "Error in reading result set: %s\n",
> mysql_error(&mysql));
>   }
>   }
>   }
> 
>   /* clean up */
> 
> mysql_free_result(result);
>   }
> mysql_close(&mysql);
> }
> 
> --
> I wouldn't recommend sex, drugs, and insanity for everyone, but it works
> for me.
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
__
Brooklyn Linux Solutions

So many immigrant groups have swept through our town 
that Brooklyn, like Atlantis, reaches mythological 
proportions in the mind of the world  - RI Safir 1998

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn

1-718-382-0585

-- 
MySQL General Maili

strmov

2004-09-05 Thread Ruben Safir Secretary NYLXS
What is the definition of strmov in C?  It seems to be a 
MYSQL library sprecific function in m_string.h and is used
in some of the documentations examples.


ruben
-- 
__
Brooklyn Linux Solutions

So many immigrant groups have swept through our town 
that Brooklyn, like Atlantis, reaches mythological 
proportions in the mind of the world  - RI Safir 1998

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://fairuse.nylxs.com

http://www.mrbrklyn.com - Consulting
http://www.inns.net <-- Happy Clients
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn

1-718-382-0585

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Segfault in mysql_real_escape_string

2004-09-06 Thread Ruben Safir Secretary NYLXS
Hello

I'm getting a segmentation fault in the mysql function mysql_real_escape_string
and I don't have a clue why.  What am I missing?

#include  /* Headers for MySQL usage */
#include 
#include 
#include 

// #define INSERT_STATEMENT "INSERT INTO patient (idno,first,last,medrec) 
VALUES(NULL,?,?,?)"

static MYSQL clinical_db;
/* static MYSQL_STMT *stmt; */
/* static MYSQL_BIND cols[3]; */
static my_ulonglong affected_rows;
/*static int param_count; */
static unsigned long str_length;
char str_data[1024];
/* static my_bool is_null; */


int main(int argc, char **argv){
  int insert_id;
  char *encdata, *query, *end, *value;
  int datasize;
  int param_count;
  
  MYSQL_RES *res; /* To be used to fetch information into */
  MYSQL_ROW row;

  mysql_init(&clinical_db);

  if(mysql_real_connect(&clinical_db, "localhost", "pharmacy", "show22case", 
"clinical", 0, NULL, 0)){
  fprintf(stderr, "No Connection: %s\n", mysql_error(&clinical_db));
  exit(0);
  }
  printf ("Hey this worked\n");
  
/* Prepared statements not supported in this version of MYSQL */  
 
/*  stmt = mysql_stmt_init(clinical_db);  */
 
//  if(!stmt){
//   fprintf(stderr, "mysql_stmt_init(), out of memory\n");
//   exit(0);
// }
 
//  if(mysql_stmt_prepare(stmt, INSERT_STATEMENT, strlen(INSERT_STATEMENT))){
//  fprintf(stderr, "mysql_stmt_prepare(), INSERT failed\n");
//   fprintf(stderr, "%s\n", mysql_stmt_error(stmt));
//  }   

/* Get parameter count and hope it is right */
//param_count = mysql_stmt_param_count(stmt);
//fprintf(stdout, "total params are %d\n", param_count);

  /* Let's try to add something to the database */

query = malloc(2048);
value = malloc(2048);
encdata = malloc(2048);
strcpy(query,"INSERT INTO patient VALUES (NULL,");
str_length = strlen(query);
end = query + str_length + 1;
printf("\nFirst Name ==>");
fgets( value, 26, stdin);
mysql_real_escape_string(&clinical_db,encdata,value,strlen(value)); <<=== 
Segmenetation Fault
/*end += mysql_real_escape_string(&clinical_db,end,value,strlen(value));*/
*end++ = ',';
printf("\nLast Name ==>");
fgets( value, 26, stdin);
end += mysql_real_escape_string(&clinical_db, end,value,strlen(value) - 1);
*end++ = ',';
printf("\nMedical Record Number==>");
fgets(value,12,stdin);
end += mysql_real_escape_string(&clinical_db, end,value,strlen(value) - 1);
end++;
strcpy(end,")");

printf("\nResulting Query %s", query);



return 0;
} /* End of main() */


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]