Re: Infos about the embedded server dll

2003-06-23 Thread Derick Smith
The function are in chapter 8.4.5 of the manual.
I tried using the embedded library in C, then calling it from VB through a 
DLL without any luck. The libmysql.dll seems to work better.
Eric

From: Wavyx [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Infos about the embedded server dll
Date: Mon, 23 Jun 2003 18:49:02 +0200
Hello,

I'm looking for informations about the Embedded Server DLL. There's not a 
lot of in the manuel (libmysqld section). Where can I Find the available 
functions? Are they the same as in the C API?
I'm planning to use the dll from C#. Does anyone already try to interop 
with the mysql server engine dll (Pinvoke and DllImport)?

Thanks for help

Wavyx



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

_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


suggestions - server options/mysql variables

2003-06-19 Thread Derick Smith
Hi!
Does anyone know any mysql options I can change in the my.ini file or mysql 
variables to increase the speed of select statements?

About database:
-uses only select statements for queries
-no transactions
-if database becomes corrupt in anyway, not a big deal I can recreate it
-it is a small database, I do not need recovery, raid or any other backup 
mechanism
-queries generally return very little data

I will test any suggestions people have for me.
Thanks
Eric
_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


RE: suggestions - server options/mysql variables

2003-06-19 Thread Derick Smith
Hi!
All the select statements have indexes on appropriate fields. Mysql appears 
to run fast, I was just wondering if there was anyway to make it faster. It 
is currently running on Windows, I have also ported it to HP-UX 11. The 
queries are of the type : SELECT * FROM textl WHERE parsetext =  and 
filter =   GROUP BY code.
I think the query code is optimized, I was wondering is there were any 
settings I could change in mysql to speed it up? or any other tricks to 
increase speed? I tried setting set-variable = key_buffer_size=64M, but that 
did not appear to make a big difference.
Thanks
Eric

From: Mike Hillyer [EMAIL PROTECTED]
To: Derick Smith 
[EMAIL PROTECTED],	[EMAIL PROTECTED],	[EMAIL PROTECTED]
Subject: RE: suggestions - server options/mysql variables
Date: Thu, 19 Jun 2003 09:13:33 -0600

If you have queries that are only selects, in small tables, with few
rows, you should have very fast performance as is. Are your queries
properly indexed? What hardware are you running on? What do these
queries look like?
Regards,
Mike Hillyer
www.vbmysql.com
 -Original Message-
 From: Derick Smith [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 19, 2003 9:08 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: suggestions - server options/mysql variables


 Hi!
 Does anyone know any mysql options I can change in the my.ini
 file or mysql
 variables to increase the speed of select statements?

 About database:
 -uses only select statements for queries
 -no transactions
 -if database becomes corrupt in anyway, not a big deal I can
 recreate it
 -it is a small database, I do not need recovery, raid or any
 other backup
 mechanism
 -queries generally return very little data

 I will test any suggestions people have for me.
 Thanks
 Eric

 _
 MSN 8 with e-mail virus protection service: 2 months FREE*
 http://join.msn.com/?page=features/virus


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


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

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Compiling:Not a valid library (invalid magic number).Possibly a 64-bit PA archive library (Mismatched ABI).

2003-06-06 Thread Derick Smith
Hi!
I am porting a program from windows to UNIX and I cannot get it to compile 
on the UNIX version. Any suggestions?? Are the libraries shipped with mysql 
correct? Am I compiling it correctly?
Any help is appreciated!
Thanks
Eric

Error exit code 1
   /opt/ansic/bin/c89 -o bin/ceagtest obj/ceagtest/ceagtest.o -lm 
lib/mysqldbi.a  lib/gcsys.a  lib/gcdbi.a  lib/sclib.a  lib/gparse2.a  
lib/cfg.a  lib/cpk.a  lib/gms.a  lib/gf.a  lib/gtrace.a 
/software/grs/actr/mysql/lib/libmysys.a
/usr/ccs/bin/ld: /software/grs/actr/mysql/lib/libmysys.a: Not a valid 
library (invalid magic number). Possibly a 64-bit PA archive library 
(Mismatched ABI).
*** Error exit code 1

Server/Version Information:
 HP-UX 11.00 Operating System
mysql status
--
/software/grs/actr/mysql/bin/mysql  Ver 12.18 Distrib 4.0.12, for 
hp-hpux11.11 (hppa2.0w)

Connection id:  3
Current database:
Current user:   [EMAIL PROTECTED]
SSL:Not in use
Current pager:  stdout
Using outfile:  ''
Server version: 4.0.12-standard-log
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/tmp/mysql.sock
Uptime: 1 day 16 hours 4 min 20 sec
Threads: 1  Questions: 12  Slow queries: 0  Opens: 6  Flush tables: 1  Open 
tables: 0  Queries per second avg: 0.000
--

mysql

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


performance - speed - length of char field

2003-06-03 Thread Derick Smith
Hi!
Can anyone tell me if a shorter char field will increase the speed of SELECT 
queries? (The char field will be indexed). This field is not a varchar.
Thanks
Eric

_
Tired of spam? Get advanced junk mail protection with MSN 8.  
http://join.msn.com/?page=features/junkmail

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


Re: HELP mysql_server_init embedded in a DLL?

2003-02-28 Thread Derick Smith
Attempts at creating an embedded mySQL DLL for VB:

I can successfully use the mysql_init() function from libmysql.lib to create 
a DLL for VB. However, when I use this function (in a DLL or lib)linked 
against the libmysqld.lib or mysqlserver.lib it crashes the VB application 
but not the C application.

I tried hard coding the arguments and servergroups for mysql_server_init (I 
also used memset to initialize the strings to 0), I get the same result.

The lib I create will always work with a C program, but the DLL will not 
work with VB.

Does anyone have any more suggestions on how to use the embedded library in 
a Visual C DLL to link with VB?

Thanks
Eric
p.s: Email received from another individual (Thanks!!):

Put the libMySql.dll in the wint\system32 directory (or in the directory 
where
your executable is!)

In vb, I use this one

the declares:

Public Declare Function mysql_init Lib libmySQL   (ByVal lMYSQL As Long) 
As
Long
Public Declare Function mysql_real_connect Lib libmySQL _
   (ByVal lMYSQL As Long, _
   ByVal sHostName As String, _
   ByVal sUserName As String, _
   ByVal sPassword As String, _
   ByVal sDbName As String, _
   ByVal lPortNum As Long, _
   ByVal sSocketName As String, _
   ByVal lFlags As Long) As Long

Public Function OpenConnection(ByVal sHostName As String, _
   ByVal sUserName As String, _
   ByVal sPassword As String, _
   ByVal sDbName As String, _
   Optional ByVal lPortNum As Long = 3306, _
   Optional ByVal lFlags As MYSQL_FLAG) As
MYSQL_CONNECTION_STATE
  
   mlMYSQL = mysql_init(mlMYSQL)
   If mlMYSQL = 0 Then
   no connection handler
   Else
   'connect to server
   If mysql_real_connect(mlMYSQL, msHostname, msUsername, msPassword,
msDbName, mlPortNum, , mlFlags) = 0 Then
 ' oops
   Else
   'connection established ... state is now open
   End If
   End If
   'setup the return value
End Function
I myselve created an dll (in vb) which encapsulates all the stuff to connect 
to
the database, use recordsets,  (as close as possible to the ADO object
model: so with connection, recordset - objects,
bookmarks, fields, ...)

Hope this helps.







From: Gelu Gogancea [EMAIL PROTECTED]
To: Derick Smith 
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: Re: HELP mysql_server_init embedded in a DLL?
Date: Fri, 28 Feb 2003 14:40:31 +0200

Hi,
- Original Message -
From: Derick Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 10:33 PM
Subject: Re: HELP mysql_server_init embedded in a DLL?
 I am posting this again, in hope that I will get a response.

 I tried doing the following (see VB code below. I got this code from
another
 site):

 I get the same error message as if I was calling the DLL I created in C
 which calls mysql_server_init.

 Is it impossible to call this function from VB or embedded in another 
DLL
 from VB?
 Can I only use the embedded mysql library in C or C++?

 Thanks
 Eric

 Public Declare Function mysql_server_init Lib
 C:\mysql40\source\lib_release\libmysqld.dll _
 (ByVal argc As Long, _
 ByVal argv As Byte, _
 ByVal groups As Byte) As Long

 Private Sub cmdmysq_server_init_Click()
 Dim argv(0) As Byte, groups(0) As Byte
 Dim i As Long
 argv(0) = Asc(0)
 groups(0) = Asc(0)
 i = mysql_server_init(0, argv, groups)
 End Sub
In my opinion,this will never work because argv and groups are pointed to
array which have a pointer char*(*);
But anyhow...if you wish to try again this formula, must declare argv and
groups ByRef because VB is responsable for the stack and the variable must
be initialized  before using like argument in function.Since argv and 
groups
are byte is a non-sense to use ASC().
I'm very pessimistic that will be work.





 From: Derick Smith [EMAIL PROTECTED]
 To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: mysql_server_init embedded in a DLL?
 Date: Wed, 26 Feb 2003 14:34:28 +
 
 Hi!
 
 I am trying to create a DLL that will hide embedded mySQL functions for
use
 with VB. I am using mysqlserver.lib. I am able to compile and execute 
the
 following code. This has to be done in C because VB is too slow :-(
 
 If mysql_server_init function is run in the DLL from Visual Basic. I 
get
 the following error message: ..referenced memory at 0x00. The
 memory could not be read.
 
 Without the mysql_server_init function it will run correctly. It will
also
 run correctly when this is compiled as a .lib file linked to a C 
program.
 
 Is it possible to embed mysql_server_init in a DLL? (So the DLL can be
used
 in VB)
 
 Thanks in advance for any responses.
 
 Thanks
 Eric
 
 
 header1.h
 
 #define GPAPI __stdcall
 
 header2.h
 
 typedef unsigned long DBS;
 #define NULLDBS  (DBS)0
 
 api.c
 
 GPAPI DBS dbNewSet (char * basedir, char

Re: HELP mysql_server_init embedded in a DLL?

2003-02-27 Thread Derick Smith
I am posting this again, in hope that I will get a response.

I tried doing the following (see VB code below. I got this code from another 
site):

I get the same error message as if I was calling the DLL I created in C 
which calls mysql_server_init.

Is it impossible to call this function from VB or embedded in another DLL 
from VB?
Can I only use the embedded mysql library in C or C++?

Thanks
Eric
Public Declare Function mysql_server_init Lib 
C:\mysql40\source\lib_release\libmysqld.dll _
   (ByVal argc As Long, _
   ByVal argv As Byte, _
   ByVal groups As Byte) As Long

Private Sub cmdmysq_server_init_Click()
   Dim argv(0) As Byte, groups(0) As Byte
   Dim i As Long
   argv(0) = Asc(0)
   groups(0) = Asc(0)
   i = mysql_server_init(0, argv, groups)
End Sub



From: Derick Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: mysql_server_init embedded in a DLL?
Date: Wed, 26 Feb 2003 14:34:28 +
Hi!

I am trying to create a DLL that will hide embedded mySQL functions for use 
with VB. I am using mysqlserver.lib. I am able to compile and execute the 
following code. This has to be done in C because VB is too slow :-(

If mysql_server_init function is run in the DLL from Visual Basic. I get 
the following error message: ..referenced memory at 0x00. The
memory could not be read.

Without the mysql_server_init function it will run correctly. It will also 
run correctly when this is compiled as a .lib file linked to a C program.

Is it possible to embed mysql_server_init in a DLL? (So the DLL can be used 
in VB)

Thanks in advance for any responses.

Thanks
Eric
header1.h

#define GPAPI __stdcall

header2.h

typedef unsigned long DBS;
#define NULLDBS  (DBS)0
api.c

GPAPI DBS dbNewSet (char * basedir, char * datadir, char * dbname)
{
return NewSet(basedir,datadir,dbname);
}
newset.c

extern DBS NewSet(char * basedir, char * datadir, char * dbname)
{
DBSET* pSet = CreateSet();
char*args[3];
char strArgs[3][1024];
int iRtn;
int argc = 3;
strcpy(strArgs[0],this_program);
sprintf(strArgs[1],--basedir=%s,basedir);
sprintf(strArgs[2],--datadir=%s,datadir);
args[0]= strArgs[0];
args[1]= strArgs[1];
args[2]= strArgs[2];
/* If I comment out this line of code,
the DLL will run correctly.
If mysql_server_init function is run in the DLL. I get the following
error message: ..referenced memory at 0x00. The
memory could not be read */
iRtn = mysql_server_init(3, args, server_groups);
if (pSet ==0 ) return NULLDBS;
memset(pSet, 0, sizeof(DBSET)); /* Zero the structure.*/
   pSet-size  = sizeof(DBSET);/* Assign structure size. */
   pSet-magic = DBS_MAGIC;  /* Assign magic number.   */
return (DBS)(void*)pSet;
}


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


mysql_server_init embedded in a DLL?

2003-02-26 Thread Derick Smith
Hi!

I am trying to create a DLL that will hide embedded mySQL functions for use 
with VB. I am using mysqlserver.lib. I am able to compile and execute the 
following code. This has to be done in C because VB is too slow :-(

If mysql_server_init function is run in the DLL from Visual Basic. I get the 
following error message: ..referenced memory at 0x00. The
memory could not be read.

Without the mysql_server_init function it will run correctly. It will also 
run correctly when this is compiled as a .lib file linked to a C program.

Is it possible to embed mysql_server_init in a DLL? (So the DLL can be used 
in VB)

Thanks in advance for any responses.

Thanks
Eric
header1.h

#define GPAPI __stdcall

header2.h

typedef unsigned long DBS;
#define NULLDBS  (DBS)0
api.c

GPAPI DBS dbNewSet (char * basedir, char * datadir, char * dbname)
{
return NewSet(basedir,datadir,dbname);
}
newset.c

extern DBS NewSet(char * basedir, char * datadir, char * dbname)
{
DBSET* pSet = CreateSet();
char*args[3];
char strArgs[3][1024];
int iRtn;
int argc = 3;
strcpy(strArgs[0],this_program);
sprintf(strArgs[1],--basedir=%s,basedir);
sprintf(strArgs[2],--datadir=%s,datadir);
args[0]= strArgs[0];
args[1]= strArgs[1];
args[2]= strArgs[2];
/* If I comment out this line of code,
the DLL will run correctly.
If mysql_server_init function is run in the DLL. I get the following
error message: ..referenced memory at 0x00. The
memory could not be read */
iRtn = mysql_server_init(3, args, server_groups);
if (pSet ==0 ) return NULLDBS;
memset(pSet, 0, sizeof(DBSET)); /* Zero the structure.*/
   pSet-size  = sizeof(DBSET);/* Assign structure size. */
   pSet-magic = DBS_MAGIC;  /* Assign magic number.   */
return (DBS)(void*)pSet;
}


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=features/junkmail

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Visual Basic Embedded VC++ DLL

2003-02-24 Thread Derick Smith
Hi!
Has anyone created a DLL in VC++ the uses the embedded mysqlserver.lib 
library? Is it possible to do this? Is there any special settings that are 
needed?

I have compiled a DLL that does this, but then I run a function wich 
encapsulates mysql_server_init(), I get a memory error and my VB program 
which references the DLL I created crashes. (When I comment out the section 
of code that references mysql_server_init, the code executes without errors 
and when I link this lib file to a C program the code also works without 
problems).

Any suggestions?

Thanks
Eric


Talk to you Later.
--
  Derick
--




_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


libmysqld.lib

2003-02-19 Thread Derick Smith
Hi!

I want to emebed libmysqld.lib into a DLL I am making for Visual Basic. I 
need to make the DLL in C because it is going to perform other functions 
(i.e I do not want to use the Public Declare in VB to access the DLL).

I need the libmysqld.lib library.

I could use LoadLibrary to load it dynamically, but I think this would be 
more work.

Does anyone know where I can get it?
Does anyone know when it will be available on the mysql.com website?

Does anyone know when the source code for the libmysqld.dll will be 
distributed (Windows version)? (I thought mysql was open source?)

Thanks
Eric


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=features/junkmail


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php