MySQL Release?

2009-09-04 Thread Alex Katebi
Hi,

I noticed that the 6.11 branch is not available for download anymore. Did
they rename it to 5.4?

Thanks,
-Alex


6.0.11 source

2009-05-21 Thread Alex Katebi
Anyone knows where I can download the 6.0.11 gziped source from?


Re: SOS mysql signal syntax error

2009-05-20 Thread Alex Katebi
OK I tried this exact syntax and I get the same error. I tried it on mysql
client for 6.0.10

On Wed, May 20, 2009 at 2:22 PM, Gavin Towey  wrote:

> Interesting.  This syntax is only supposed to be available as of 5.4, but
> it doesn't even work there.  The reference I found was at :
> http://dev.mysql.com/tech-resources/articles/mysql-54.html
>
> But I couldn't find other references to the new signal support.
>
> This is listed as the example on that page, but it doesn't work in
> 5.4.0-beta
>
> CREATE PROCEDURE p (divisor INT)
> BEGIN
>  DECLARE divide_by_zero CONDITION FOR SQLSTATE '22012';
>  IF divisor = 0 THEN
>  SIGNAL divide_by_zero;
> END IF;
> END
>
> Methinks someone forgot to include this feature in the release!
>
>
> -Original Message-
> From: Alex Katebi [mailto:alex.kat...@gmail.com]
> Sent: Wednesday, May 20, 2009 10:58 AM
> To: mysql
> Subject: SOS mysql signal syntax error
>
> Hi Folks,
>
>  I am getting syntax error with the mysql signal. I have a trigger
> that needs a signal for raising an error condition if a row with
> specific value  is removed.
>
>  CREATE TRIGGER my_trig BEFORE DELETE ON my_tbl
>  FOR EACH ROW BEGIN
>  DECLARE mysig CONDITION FOR SQLSTATE '45000';
>  IF OLD.name = 'base' THEN
> SIGNAL mysig SET MESSAGE_TEXT='base row removal is not allowed';
>  END IF;
>  END
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=gto...@ffn.com
>
>
> The information contained in this transmission may contain privileged and
> confidential information. It is intended only for the use of the person(s)
> named above. If you are not the intended recipient, you are hereby notified
> that any review, dissemination, distribution or duplication of this
> communication is strictly prohibited. If you are not the intended recipient,
> please contact the sender by reply email and destroy all copies of the
> original message.
>


SOS mysql signal syntax error

2009-05-20 Thread Alex Katebi
Hi Folks,

  I am getting syntax error with the mysql signal. I have a trigger
that needs a signal for raising an error condition if a row with
specific value  is removed.

  CREATE TRIGGER my_trig BEFORE DELETE ON my_tbl
  FOR EACH ROW BEGIN
  DECLARE mysig CONDITION FOR SQLSTATE '45000'; 
  IF OLD.name = 'base' THEN 
 SIGNAL mysig SET MESSAGE_TEXT='base row removal is not allowed';   

  END IF;   
  END

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



What is wrong with this SYNTAX?

2009-05-19 Thread Alex Katebi
It is complaining about near STRCMP.

  CREATE TRIGGER bgp.tglobal BEFORE UPDATE on bgp.global
  FOR EACH ROW BEGIN
  IF STRCMP(NEW.Variable_name,'ASN') != 0 THEN
 set NEW.Variable_name=NULL;
  ELSEIF STRCMP(NEW.Variable_name, 'RouterId') != 0 THEN
 set NEW.Variable_name=NULL
  ELSEIF STRCMP(NEW.Variable_name, 'ASN') != 0 THEN
 set NEW.Value=CONVERT(CONVERT(NEW.Value, UNSIGNED), CHAR);
  ELSEIF STRCMP(NEW.Variable_name, 'RouterId') != 0 THEN
 set NEW.Value=INET_NTOA(INET_ATON(NEW.Value));
  ENDIF
  END

Thanks in advance!
Alex


Re: Native Function

2009-05-18 Thread Alex Katebi
Hello Martin,

   This sounds great! I am not sure if plugins are supported for the
embedded mysql applications. Meaning that my application is linked with the
libmysqld not libmysql. Do you know the answer?

Thanks,
Alex



On Mon, May 18, 2009 at 10:17 AM, Martin Gainty  wrote:

>  yes if the library is a plugin
> create the plugin
> http://dev.mysql.com/doc/refman/5.1/en/plugin-api.html
> also make sure the table mysql.plugin is created
>
> compile and run mysqld dynamically is a pre-requisite
> http://dev.mysql.com/doc/refman/5.1/en/plugin-writing.html
>
> once the dynamic lib is created follow these instructions to install the
> plugin
> http://dev.mysql.com/doc/refman/5.1-maria/en/install-plugin.html
>
> Martin Gainty
> __
> Jogi és Bizalmassági kinyilatkoztatás/Verzicht und
> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése
> nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi
> alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen
> megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet
> tartalma miatt.
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>
>
> > Date: Mon, 18 May 2009 09:33:15 -0400
> > Subject: Native Function
> > From: alex.kat...@gmail.com
> > To: mysql@lists.mysql.com
>
> >
> > Hi All,
> >
> > I am using the mysql embedded library (libmysqld) in my application. I
> > am using triggers and calling a C/C++ function in my application. This is
> > how I convey configuration changes to my application.
> > I think my only choice is to make a Native Function in the mysql source
> code
> > since UDF is not avialable in libmysqld. It would be nice if there were a
> > generic function for this purpose that would take two string arguments
> and
> > return an integer. This way I can use it for anywhere I need to tie in
> > triggers to my application.
> >
> > Is there an easier way to accomplish this. I mean invoking an application
> > C/C++ function from mysql stored procedures?
> >
> > Thanks in andvance!
> > Alex
>
> --
> Hotmail® has a new way to see what's up with your friends. Check it 
> out.
>


Native Function

2009-05-18 Thread Alex Katebi
Hi All,

   I am using the mysql embedded library (libmysqld) in my application.  I
am using triggers and calling a C/C++ function in my application. This is
how I convey configuration changes to my application.
I think my only choice is to make a Native Function in the mysql source code
since UDF is not avialable in libmysqld. It would be nice if there were a
generic function for this purpose that would take two string arguments and
return an integer. This way I can use it for anywhere I need to tie in
triggers to my application.

Is there an easier way to accomplish this. I mean invoking an application
C/C++ function from mysql stored procedures?

Thanks in andvance!
Alex


Re: AMD64

2009-04-07 Thread Alex Katebi
On Tue, Apr 7, 2009 at 11:17 AM, Martijn Tonies wrote:

> Alex,
>
> Please respond to the list instead of my personal address.

sorry I thought i was.

>
>
>
> Nevertheless, if MYSQL_TYPE_LONG is the datatype for a table field,
> it would always -have- to be the same size, cause different clients can
> connect (if not being embedded), wouldn't it?


Yes if 64bit clients and 32bit servers or 32bit clients and 64bit servers
can talk to each other.
Do they? I found it much too complicated to go that route for my
client/server design. In my case the answer is no.



>
> With regards,
>
> Martijn Tonies
> Upscene Productions
> http://www.upscene.com
>
> Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
> Anywhere, MySQL, InterBase, NexusDB and Firebird!
>
> Database questions? Check the forum:
> http://www.databasedevelopmentforum.com
>
>
>
>  Hi Martijn,
>
>  I made an embedded mysql server. The API for the clients to my server use
> the standard mysql client C API. If clients pass bad pointers to the server
> I don't want the server to crash. So the server knows about all valid mysql
> connections. If a bad mysql pointer is passed in, it can detect that. So
> when I save valid pointers when a connection is made I like to save it as a
> MYSQL_TYPE_LONG. The client and the server has to run on similar type
> machines. 64bit client with 64bit server and 32bit client with 32bit server,
> no mismatch. The Long size in a 32bit machine is 4 bytes but in a 64bit
> machine is 8 bytes. So I wanted to avoid conditionals for building for a
> 64bit machine.
>
>
>  On Tue, Apr 7, 2009 at 10:49 AM, Martijn Tonies 
> wrote:
>
>
>
>  What is the size of MYSQL_TYPE_LONG in a 64bit machine? I am trying to
> save
>  pointers. If this type is 4 bytes on a 32bit machine and 8 bytes on a
> 64bit
>  machine will make it much easier.
>
>
>
>Ehm, wouldn't that like, totally fail if -saved- by a 64bit machine and
> -read- by
>a 32bit machine if that were the case?
>
>Perhaps you should explain in more detail what you're trying to do?
>
>With regards,
>
>Martijn Tonies
>Upscene Productions
>http://www.upscene.com
>
>Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
>Anywhere, MySQL, InterBase, NexusDB and Firebird!
>
>Database questions? Check the forum:
>http://www.databasedevelopmentforum.com
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe:
> http://lists.mysql.com/mysql?unsub=alex.kat...@gmail.com
>
>
>
>


passing a bad pointer question

2009-04-07 Thread Alex Katebi
Hi,

   If I have a mysql client application that passes a bad MYSQL* connection
pointer to the server. How does the server cope with that.
Does the server crash? Or does the server drops the client connection? Or
does the server ignore the function call and return error?
If it returns error what is the error code?

Thanks,
-Alex


AMD64

2009-04-07 Thread Alex Katebi
Hi,

What is the size of MYSQL_TYPE_LONG in a 64bit machine? I am trying to save
pointers. If this type is 4 bytes on a 32bit machine and 8 bytes on a 64bit
machine will make it much easier.

Thanks,
-Alex


is this a bug?

2009-03-21 Thread Alex Katebi
In mysql embedded server 6.09 built from source for Linux 2.6.27.11
kernel.
First create a connection (mysql_real_connect) then close the connection in
a different thread.
This causes a SIGSEGV crash in THD:store_globals ( ).  My mysql embedded
library is thread-safe.

Thanks in advance,
-Alex


Autoconf & --basedir

2009-01-27 Thread Alex Katebi
Anyone knows how to figure out the mysql basedir string using Autoconf and
then pass it to Automake for an embedded application?

Thanks in advance,
-Alex


stored procedures & embedded server

2008-12-03 Thread Alex Katebi
   For embedded server do I need to configure
--with-embedded-privilege-control?
It looks like stored procedure is looking for mysql.proc table.

Thanks.


embedded client test scripts

2008-10-12 Thread Alex Katebi
Any information on how to run the test scripts for the embedded client.

Thanks,
-Alex


Tables are too wide

2008-09-27 Thread Alex Katebi
Hi,

  When selecting (example: select * from mysql.db ) some of the mysql
database tables the result set does not fit in a standard xterm window. Is
there any terminal display program in Linux that has a horizontal scroll bar
that I can use? Or what can I do to split the table output to fit on my
screen?

Thanks,
-Alex


UDF Question

2008-09-04 Thread Alex Katebi
Hello,

  I am planning to write a UDF (User Defined Function) that acts like a
server side client. This UDF is called by a client first. After that the UDF
spwans a thread then exits. Within this spawned thread it will get work from
a network socket. After that it will start executing SQL statements against
some database tables in the server.

  What are the ramifications of the above model within the MySql Server.

Thanks,
-Alex


mysql user and authentication ???

2008-08-31 Thread Alex Katebi
Hello,

I just installed the 6.0.6 version of the mysqld on Linux using the
binary RPM.
The RPM installed all the programs then it started the mysqld server.

I read lots of documents about mysql user and password. But I have no idea
what the users are used for, and how users are created.

The Linux root user is the only user that can start and stop the server. Is
this fact correct?

Thanks,
-Alex


starting mysqld on Linux fedora

2008-08-30 Thread Alex Katebi
Hello,

  Is there any documentation on how to start the mysqld server.
I have installed version 6.0 server and client. But I don't know how to
start the server correctly.

Thanks,
-Alex