Fw: pls help ...............

2004-02-24 Thread CurlyBraces Technologies \( Pvt \) Ltd




- Original Message - 
From: CurlyBraces Technologies ( Pvt ) Ltd 

To: [EMAIL PROTECTED] 
Sent: Tuesday, February 24, 2004 12:05 PM
Subject: pls help ...

hi , 

when i try to get mysql data to the web browser via 
php , always it is showing 
Parse error: parse error, unexpected T_LNUMBER, expecting 
',' or ';' in /var/www/html/smsc/test1.php on line 14
error message. but i tried to rectify the essage , 
i couldn't.
can some body help me to solve the problem 
?

thanx in advance

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

Fw: MySql and php

2004-02-24 Thread CurlyBraces Technologies \( Pvt \) Ltd




- Original Message - 
From: CurlyBraces Technologies ( Pvt ) Ltd 

To: Eve Atley 
Sent: Tuesday, February 24, 2004 2:15 AM
Subject: Re: MySql and php

thanx alot for ur reply , i think better to send my 
script to u .In third collom , there is two different status . I want to 
highlight those with two different colors.There is to be satisfied some simple 
condition , plz help


thanx
curlys

?php
/* Connecting, selecting database */
$link = mysql_connect("localhost", "root", "*")
or die("Could not connect");
/*print "Connected successfully";*/
mysql_select_db("smsc") or die("Could not select database");

/* Performing SQL query */
$query = "SELECT * FROM ServiceStatus";
$result = mysql_query($query) or die("Query failed");

/* Printing results in HTML */
print "table\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\ttr\n";
foreach ($line as $col_value) {
print "\t\ttd$col_value/td\n";
}
print "\t/tr\n";
}
print "/table\n";

/* Free resultset */
mysql_free_result($result);

/* Closing connection */
mysql_close($link);
?



  - Original Message - 
  From: 
  Eve Atley 
  
  To: CurlyBraces Technologies ( Pvt ) 
  Ltd 
  Sent: Tuesday, February 24, 2004 4:52 
  AM
  Subject: RE: MySql and php
  
  You 
  want the rows to alternate colors in the table, you mean? That's 
  easy.
  
  ?
  function alternate_2colors($color_1, $color_2, 
  $cpt){$colors = ($cpt % 2) ? $color_1 : 
  $color_2;return $colors;}
  
  while ($row = mysql_fetch_array($result_jobslisting, 
  MYSQL_ASSOC)) {$nb += 1;$colors = 
  alternate_2colors('#C0C0C0', '#FF', 
  $nb);?
   tr 
  bgcolor="?php echo $colors; ?" td 
  width="39%"html content here
  /td /tr
  ?}?
  
  Eve AtleyWOW Corporation 
  LLC.555 North Bell Ave.Carnegie, PA 15106TEL: 
  412-278-1838CELL: 412-716-6060 
  
  
-Original Message-From: CurlyBraces Technologies ( 
Pvt ) Ltd [mailto:[EMAIL PROTECTED]Sent: Monday, February 
23, 2004 10:05 AMTo: [EMAIL PROTECTED]Subject: 
MySql and php
hi , 
i have a problem with Mysql Vs php .. Can 
somebody help me to sort out this problem ?

I wrote a php script to connet mysql data base 
and get some data from some table of the database. It works well 
..

1 data1 
data2
5 ccc 
 xcx
3 aaa 
123
2 klkl 
opop
4 opop 
pop

I want do the sort for the fields while its 
showing from the web. and in the third data field i want to add some colors 
while its running in the html .

can some body help me to do the scripting plz 
?

thanx in advace

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

Re: about PHP user interface

2004-02-24 Thread Egor Egorov
Togochog Enhebatu [EMAIL PROTECTED] wrote:
 
 I am new in PHP, and I would like to create some user interface with PHP. 
 Could anyone tell me what is the easiest way to do this?
 

It's better to use PHP mailing list which is better decicated for this purpose:
http://www.php.net/mailing-lists.php



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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



re: WG: [mysql.com #3839] UTF8 and MySQL 4.1

2004-02-24 Thread Jeremy March
What client are you using to connect to the server?

If its MyODBC 3.51 then that is your problem.  It doesn't support
unicode yet.  

If you are using the mysql command line client try select
Hex(your_column) from your_table; to see if the proper hex values are
being inserted into the table.  

It will be easier to help you if you give us more specific problems you
are having.  

best,
Jeremy


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



Re: Concat. operator ||

2004-02-24 Thread Hassan Shaikh
Hi Paul,

Using the following fixed things. However, I am surprised at why it is 
not working in 4.0.18 (Win32)? Previously I had 4.0.17 (Win32) and 
things work perfectly. I guess you are right, it's a bug.

[mysqld]
sql-mode=REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY 

transaction-isolation=SERIALIZABLE

Thanks.

Hassan



Paul DuBois wrote:

At 12:50 -0600 2/23/04, Paul DuBois wrote:

At 15:59 +0200 2/23/04, Victoria Reznichenko wrote:

Hassan Shaikh [EMAIL PROTECTED] wrote:

 I am running MySQL in ANSI standard mode. However the following
 statement is giving unexpected result. Am I missing something?
mysql select 'This is a' || ' test string';
+---+
| 'This is a' || ' test string' |
+---+
| 0 |
+---+
1 row in set (0.00 sec)
 Here's a part of my my.ini, indicating that I am in ANSI mode.

 # The MySQL server
 [mysqld]
 port=3306
 #socket=MySQL
 skip-locking
 set-variable= sql-mode=ansi

This should work, but when I try it, it doesn't work.  (The sql_mode
variable is set to 4, which is the numeric equivalent of the ANSI_QUOTES
option.  I believe what's happening is that there is an attempt to match
prefixes of option names that is done incorrectly.)
I'll file a bug report.  In the meantime, you can use this instead:

[mysqld]
ansi


Oops, sql-mod=ansi not working isn't a bug after all, at least not if 
you're
using MySQL 4.x.  The ansi shortcut was added in 4.1.1:

http://www.mysql.com/doc/en/Server_SQL_mode.html



That should produce the desired effect.

  set-variable= key_buffer=32M

 set-variable= max_allowed_packet=1M
 set-variable= table_cache=32
 set-variable= net_buffer_length=8K
 set-variable= sort_buffer=1M
 set-variable= record_buffer=512K
 set-variable= myisam_sort_buffer_size=4M
 set-variable= thread_cache=8
 # Try number of CPU's*2 for thread_concurrency
 set-variable= thread_concurrency=8
 log-bin
 server-id= 1
What version of MySQL do you use?
If you use version  4.1 , you should put in the my.cnf
[mysqld]
ansi
...
or

[musqld]
sql-mode=REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY 

transaction-isolation=SERIALIZABLE
..
--
For technical support contracts, goto 
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





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


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



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


Re: pls help ...............

2004-02-24 Thread Nitin Mehta
there must be some problem in concatenation of strings and number variables. If you 
can send the lines, we'll be able to suggest the exact change.

Hope that helps
Nitin

  - Original Message - 
  From: CurlyBraces Technologies ( Pvt ) Ltd 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 24, 2004 12:08 PM
  Subject: Fw: pls help ...



  - Original Message - 
  From: CurlyBraces Technologies ( Pvt ) Ltd 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 24, 2004 12:05 PM
  Subject: pls help ...


  hi , 

  when i try to get mysql data to the web browser via php , always it is showing 
  Parse error: parse error, unexpected T_LNUMBER, expecting ',' or ';' in 
/var/www/html/smsc/test1.php on line 14

  error message. but i tried to rectify the essage , i couldn't.
  can some body help me to solve the problem ?

  thanx in advance

  curlys


--


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

install problem

2004-02-24 Thread Maria Yndefors
Hi!

I have installed the mysql server and client on an RedHat 7.3 but after
installation I can't login as root. The message I get is:

I installed by using rpms

 

mysql -u root mysql

ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
NO)

 

The access rights to the /var/lib/mysql is:

 

[EMAIL PROTECTED] mysql]# ll /var/lib/

total 40

drwxr-xr-x2 root root 4096 Jan  8 17:39 alternatives

drwxr-xr-x2 root root 4096 Feb  6  1996 games

-rw-r--r--1 root root  293 Feb 24 10:48 logrotate.status

drwxr-xr-x2 root root 4096 May 15  2000 misc

drwxrwxrwx5 mysqlmysql4096 Feb 24 11:20 mysql

drwxrwxrwx4 mysqlmysql4096 Feb 23 16:10 mysql-innodb

-rw---1 root root  512 Feb 24 10:43 random-seed

drwxr-xr-x2 rpm  rpm  4096 Feb 24 10:48 rpm

drwxr-x---2 root slocate  4096 Feb 24 10:49 slocate

drwxrwxrwt2 root root 4096 Jan  8 17:40 texmf

 

 

Hoping for some help on this matter

 

Best Regards

 

/Maria Yndefors



Re: run query second time

2004-02-24 Thread Nitin Mehta
that's called, cache-hit


- Original Message - 
From: Matt W [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 5:25 AM
Subject: Re: run query second time


 Hi Mike,


 - Original Message -
 From: Mike Mapsnac
 Sent: Monday, February 23, 2004 5:49 PM
 Subject: run query second time


  Hello
 
  Today I run large query. It took more than 1 minute to start printing
 the
  results. The output was about 5 rows. However, when I run the
 query
  second time it took a couple of seconds before printing the results.
 Why is
  that? Because data still in the RAM?
 
  Thanks

 Yep, that's usually why. :-)


 Matt


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




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



Re[2]: MySQL Administrator - Startup Variables

2004-02-24 Thread Stefan Hinz
Matt, Thomas,

 Oh we are using Red Hat Enterprise Linux WS ver 3.0

Please enter a bug report at http://bugs.mysql.com. Thank you.

 Thomas Taylor wrote:

 what platform are you on?
 On Feb 23, 2004, at 4:27 PM, Matt Silva wrote:

 I am using the ~new~ MySQL Administrator and i'm trying to load the 
 Startup Variables and i'm receiving a Could
 not find my.cnf error.  my.cnf is located in the /etc directory and 
 I have temporarily relaxed the permissions to
 777.  Is there something that i'm missing here?  Or is there a bug in 
 the Administrator program?

 Thanks
 Matt

 -- 
 Matt Silva
 Empower Software Technologies, LLC
 27851 Bradley Rd. Suite 120
 Sun City, CA 92586

 PH: (909) 672-6257
 WB: www.storagecommander.com
 EM: [EMAIL PROTECTED]


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


 Thanks,
 Thomas Taylor
 17106 76th Ave
 Maple Grove, MN 55311
 [EMAIL PROTECTED]


 -- 
 Matt Silva
 Empower Software Technologies, LLC
 27851 Bradley Rd. Suite 120
 Sun City, CA 92586

 PH: (909) 672-6257
 WB: www.storagecommander.com
 EM: [EMAIL PROTECTED]




Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


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



Re: install problem

2004-02-24 Thread Davut Topcan
Hi
From: Maria Yndefors [EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 11:35 AM

 mysql -u root mysql
 
 ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
 NO)

Try of following;

-
#mysql -u root -p password 
-

connected in then

-
mysql \u mysql;
-

Regards..
Jack..
 


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



RE: install problem

2004-02-24 Thread Maria Yndefors
Hi, Thanks for the fast reply,

I have not set the root password and I get the same result

[EMAIL PROTECTED] gms]# mysql -u root -p
Enter password:
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
NO)

Best Regards
/Maria Yndefors

-Original Message-
From: Davut Topcan [mailto:[EMAIL PROTECTED] 
Sent: den 24 februari 2004 10:48
To: Maria Yndefors
Cc: [EMAIL PROTECTED]
Subject: Re: install problem

Hi
From: Maria Yndefors [EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 11:35 AM

 mysql -u root mysql
 
 ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
 NO)

Try of following;

-
#mysql -u root -p password 
-

connected in then

-
mysql \u mysql;
-

Regards..
Jack..
 


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



Re: install problem

2004-02-24 Thread Victoria Reznichenko
Maria Yndefors [EMAIL PROTECTED] wrote:
 I have installed the mysql server and client on an RedHat 7.3 but after
 installation I can't login as root. The message I get is:
 
 I installed by using rpms

 
 mysql -u root mysql
 
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
 NO)

Does user root have a password? Use -p option of mysql client to specify user password.

mysql -uroot -p mysql

and then enter root password.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





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



Fw: install problem

2004-02-24 Thread Davut Topcan
Hi,
From: Maria Yndefors [EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 11:54 AM
 I have not set the root password and I get the same result
hmm..
You should set root password :)
 
Regards,
Jack..


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



Re: install problem

2004-02-24 Thread Victoria Reznichenko
Maria Yndefors [EMAIL PROTECTED] wrote:
 Hi, Thanks for the fast reply,
 
 I have not set the root password and I get the same result
 
 [EMAIL PROTECTED] gms]# mysql -u root -p
 Enter password:
 ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
 NO)
 

Do you have installed MySQL server before? Seems MySQL server uses old data dir.

You can reset root password: start MySQL server with --skip-grant-tables option, set 
up new password for root and restart MySQL server or just reload privilege tables. 
More detailed instruction you can find at:
http://www.mysql.com/doc/en/Resetting_permissions.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





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



Re: install problem

2004-02-24 Thread Nitin Mehta
are you using MySql 4.x?

try only
mysql

Hope that helps
Nitin

- Original Message - 
From: Davut Topcan [EMAIL PROTECTED]
To: Maria Yndefors [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 3:37 PM
Subject: Fw: install problem


 Hi,
 From: Maria Yndefors [EMAIL PROTECTED]
 Sent: Tuesday, February 24, 2004 11:54 AM
  I have not set the root password and I get the same result
 hmm..
 You should set root password :)

 Regards,
 Jack..


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




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



Re: question about number of processes.

2004-02-24 Thread Egor Egorov
Randy Paries [EMAIL PROTECTED] wrote:
 Hello
 
 I have a number of servers.
 
 I have one running RH7.3 with mysql-3.23.56-1.73
 one running RH9 with mysql-3.23.58-1.9
 
 My question is when i do a ps -ef
 
 on RH7.3 a get a number of /usr/libexec/mysqld
 on RH9 i only get one.
 
 can someone please explain why. does RH9 display thread differently?
 

MySQL server is a single multithreaded process.

On Red Hat 7.3 ps shows threads as processes. On Red Hat 9 you can see threads with -m 
option of ps.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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



Re: Urgent: Prepared Statements C API hangup the Server - Help Urgent....

2004-02-24 Thread Arunachalam
hi,

I wish to provide some more information too regarding MySQL 
Server hangup.

Once after I execute the C sample program, WinMySQLAdmin tool 
and  query commands from *mysql* console never responds. 
During this time if I try to start mysqld from another console 
produce the following error message;

C:\mysqld --debug
Can't start server: Bind on TCP/IP port: No error
040223 19:18:22  Do you already have another mysqld server 
 running on port: 3306?
040223 19:18:22  Aborting
040223 19:18:23  mysqld: Shutdown Complete

What could make the server become inactive or hangup while
executing Client C API functions.

thank you

Expecting your valuable reply.

regards,
Arun.


 --- Arunachalam [EMAIL PROTECTED] wrote:  Hi,
 
 I have written in intermediate, on the appropriate position in this 
 discussion, please go thru in full.
 
  --- Michael Widenius [EMAIL PROTECTED] wrote:  
  hi!
  
   A == Arunachalam  [EMAIL PROTECTED] writes:
  
  A As per my searching I have found the right C API in libmysql.lib from
  A MySQL 5.0.0, (i have doubt: Is any eariler version 4.0.xx provides this???)
  A C API routines are: mysql_prepare(), mysql_bind_param(), mysql_execute(), 
  A mysql_stmt_affected_rows(), mysql_fetch(), mysql_stmt_close()...
  
  You should probablty use MySQL 4.1 instead of MySQL 5.0 for testing
  this as we make more often releases for 4.1 than for 5.0 (until 4.1 is
  production ready).
 
 
 I didn't find the API's what I have specified above in MySQL 4.1.1 in 
 *libmysql.dll*,  but those API's are provided by *mysqlclient.lib* in 
 this version. 
 
 I have created COBOL specific *libmysql.lib* from existing *libmysql.dll* 
 becaz libmysql is Dynamic Access Library - right.  
 
 (what I have did to convert libmysql.dll file into COBOL compiler 
 specific *libmysql.lib* is by using an utility *pexports.exe*, i have
 convert given libmysql.dll into libmysql.def file then by using LIB.EXE
 of COBOL compiler convert libmysql.def into libmysql.lib file.)
 
 
 
  A I have installed MySQL 5.0.0-alpha for Windows and I have properly linked 
  A thelibmysql.lib into my COBOL compiler... To verify the Parameter Passing 
  A mechanism to the API routines i have taken the sample C code from MySQL 
  A manual (URL: * http://www.mysql.com/doc/en/mysql_execute.html * )
  
  A When I compiled this sample coding using VC++, it ask for *typelib.h* header 
  A file, it is not given with insatllation pack, under the Mysql folder 
  A (C:/MySQL/Include), I have searched on the net and include it accordingly.
  
  Thanks for notifying us about this. typelib.h should be included in
  the MySQL folder and we will do that for next MySQL windows release.
  (4.1.2)
  
  A After that i have made changes in some variable names becaz of it follows 
  A other header files variable name as such.
  
  What changes did you have to make ?
  Including typelib.h should be enough.
 
 When I try to first compile this program in VC++ it notify the mismatch
 variable as 
 
 MYSQL_BINDbind[3];
 which is already used by winsock.h header file, so I have change this variable
 into *Pbind* like this. (I have doubt: after your discussion i once again compiled
 it with previous name(i.e, bind) it never produce any error).
 
 The variable mysql used in other API's to be changed to *mysql*, I have changed 
 this after meeting the following errors;
 
 D:\vcprojects\mysql\src\source.c(41) : error C2115: 'function' :  incompatible types
 D:\vcprojects\mysql\src\source.c(41) : warning C4024: 'mysql_query' : different 
 types for formal
 and actual parameter 1
 D:\vcprojects\mysql\src\source.c(44) : error C2115: 'function' : incompatible types
 D:\vcprojects\mysql\src\source.c(44) : warning C4024: 'mysql_error' : different 
 types for formal
 and actual parameter 1
 D:\vcprojects\mysql\src\source.c(48) : error C2115: 'function' : incompatible types
 D:\vcprojects\mysql\src\source.c(58) : warning C4024: 'mysql_prepare' : different 
 types for
 formal
 and actual parameter 1
 D:\vcprojects\mysql\src\source.c(62) : error C2115: 'function' : incompatible types
  
  I will ask our windows team to verify that the example works ok with
  VC++
  
  A Upon all the changes I can able to execute succcessfully the coding and it 
  A does the function properly on the MySQL server database.
  
  A The PROBLEM I met is, Once this sample code executed and inserted data to 
  A the Database the server get's hanged - why???
 
 
 After the discussion with you only i came to listen mysqld.trace, but it's content 
 cann't be understand by me, herewith I have attached that file for your reference.
 anyhow i understand that there is some Memory alloca/dealloc problem hangs up my
 MySQL server.
 
  
  This shouldn't happen.
  Can you please describe exactly what you mean with a 'hang' ?
  
  - Does the connection in your test program stop respoding ?
 Yes, if I run the client C program again, the console ouput stay blank
 with out any 

Why Doesn;t this Date Query Work?

2004-02-24 Thread Scott Bailey
Hello All,

I have a very strange problem which makes no sense to me whatsoever.

I am trying to find the number of queries that the people have dealt with
in a database between two dates. The dates are generated from some drop
down boxes and dropped into a variable. This is the code for the query.

$sql = 'SELECT Username, Count( Username ) FROM MainDetails, Usernames
WHERE MainDetails.UserID = Usernames.UserID and Date Between \'$Date1\'
and \'$Date2\' GROUP BY Username';

The strange thing is if I replace the $Date2 variable with a date manually
it works -. i.e. 

$sql = 'SELECT Username, Count( Username ) FROM MainDetails, Usernames
WHERE MainDetails.UserID = Usernames.UserID and Date Between \'$Date1\'
and \'2004-01-01\' GROUP BY Username';

This would indicate that the variable is wrong but it is not. The code to
generate the variable is exactly the same as $Date1 further more it echos
on screen and is creating the date in the format as entered in the manual
version?

Any ideas?


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



4.0.X with 4.1.1

2004-02-24 Thread Andrey Kotrekhov
SQL
Hi, All!
Is 4.1.1 replication compatible with 4.0.x?

I have problem to replicate data from 4.0.17  to 4.1.1
show slave status show all are OK
perlicate position and the exec position are the same.
But if I update data on master, slave is not update own data :(



Best regards.
___
Andrey Kotrekhov [EMAIL PROTECTED]
ISP Alkar Teleport
. +380 562 34-00-44

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



Re: Urgent: Prepared Statements C API hangup the Server - Help Urgent....

2004-02-24 Thread Arunachalam
hi,

I have created the COBOL coding to test those C API from
MySQL. Upon executing this COBOL program too hangup the server
but here using mysql_error() I got the error message in a
variable as 
  *Can't open shared memory. Request event don't create  (2)*

These Error I captured after running the Prepared statement 
mysql_prepare() when executing mysql_bind_param().

What does this error mean to say

I missed to quote the memory usage error when I try the mysqld from
console once after the server hangup when running C program is

C:\mysqld --debug
Can't start server: Bind on TCP/IP port: No error
040223 19:18:22  Do you already have another mysqld server running 
 on port: 3306?
040223 19:18:22  Aborting
040223 19:18:23  mysqld: Shutdown Complete
Maximum memory usage: 20726 bytes (21k)

Is i need to make changes in *my.ini* for the memory buffers?

Pls reply with detail

Thanks

Arun.

 --- Arunachalam [EMAIL PROTECTED] wrote:  hi,
 
 I wish to provide some more information too regarding MySQL 
 Server hangup.
 
 Once after I execute the C sample program, WinMySQLAdmin tool 
 and  query commands from *mysql* console never responds. 
 During this time if I try to start mysqld from another console 
 produce the following error message;
 
 C:\mysqld --debug
 Can't start server: Bind on TCP/IP port: No error
 040223 19:18:22  Do you already have another mysqld server 
  running on port: 3306?
 040223 19:18:22  Aborting
 040223 19:18:23  mysqld: Shutdown Complete
 
 What could make the server become inactive or hangup while
 executing Client C API functions.
 
 thank you
 
 Expecting your valuable reply.
 
 regards,
 Arun.
 
 
  --- Arunachalam [EMAIL PROTECTED] wrote:  Hi,
  
  I have written in intermediate, on the appropriate position in this 
  discussion, please go thru in full.
  
   --- Michael Widenius [EMAIL PROTECTED] wrote:  
   hi!
   
A == Arunachalam  [EMAIL PROTECTED] writes:
   
   A As per my searching I have found the right C API in libmysql.lib from
   A MySQL 5.0.0, (i have doubt: Is any eariler version 4.0.xx provides this???)
   A C API routines are: mysql_prepare(), mysql_bind_param(), mysql_execute(), 
   A mysql_stmt_affected_rows(), mysql_fetch(), mysql_stmt_close()...
   
   You should probablty use MySQL 4.1 instead of MySQL 5.0 for testing
   this as we make more often releases for 4.1 than for 5.0 (until 4.1 is
   production ready).
  
  
  I didn't find the API's what I have specified above in MySQL 4.1.1 in 
  *libmysql.dll*,  but those API's are provided by *mysqlclient.lib* in 
  this version. 
  
  I have created COBOL specific *libmysql.lib* from existing *libmysql.dll* 
  becaz libmysql is Dynamic Access Library - right.  
  
  (what I have did to convert libmysql.dll file into COBOL compiler 
  specific *libmysql.lib* is by using an utility *pexports.exe*, i have
  convert given libmysql.dll into libmysql.def file then by using LIB.EXE
  of COBOL compiler convert libmysql.def into libmysql.lib file.)
  
  
  
   A I have installed MySQL 5.0.0-alpha for Windows and I have properly linked 
   A thelibmysql.lib into my COBOL compiler... To verify the Parameter Passing 
   A mechanism to the API routines i have taken the sample C code from MySQL 
   A manual (URL: * http://www.mysql.com/doc/en/mysql_execute.html * )
   
   A When I compiled this sample coding using VC++, it ask for *typelib.h* header 
   A file, it is not given with insatllation pack, under the Mysql folder 
   A (C:/MySQL/Include), I have searched on the net and include it accordingly.
   
   Thanks for notifying us about this. typelib.h should be included in
   the MySQL folder and we will do that for next MySQL windows release.
   (4.1.2)
   
   A After that i have made changes in some variable names becaz of it follows 
   A other header files variable name as such.
   
   What changes did you have to make ?
   Including typelib.h should be enough.
  
  When I try to first compile this program in VC++ it notify the mismatch
  variable as 
  
  MYSQL_BINDbind[3];
  which is already used by winsock.h header file, so I have change this variable
  into *Pbind* like this. (I have doubt: after your discussion i once again compiled
  it with previous name(i.e, bind) it never produce any error).
  
  The variable mysql used in other API's to be changed to *mysql*, I have changed 
  this after meeting the following errors;
  
  D:\vcprojects\mysql\src\source.c(41) : error C2115: 'function' :  incompatible 
  types
  D:\vcprojects\mysql\src\source.c(41) : warning C4024: 'mysql_query' : different 
  types for
 formal
  and actual parameter 1
  D:\vcprojects\mysql\src\source.c(44) : error C2115: 'function' : incompatible types
  D:\vcprojects\mysql\src\source.c(44) : warning C4024: 'mysql_error' : different 
  types for
 formal
  and actual parameter 1
  D:\vcprojects\mysql\src\source.c(48) : error C2115: 'function' : incompatible types
  

Re: Why Doesn;t this Date Query Work?

2004-02-24 Thread Jigal van Hemert
 $sql = 'SELECT Username, Count( Username ) FROM MainDetails, Usernames
 WHERE MainDetails.UserID = Usernames.UserID and Date Between \'$Date1\'
 and \'$Date2\' GROUP BY Username';

 The strange thing is if I replace the $Date2 variable with a date manually
 it works -. i.e.

Not a MySQL issue, but an error in your PHP code. Single quotes do NOT
replace variables with their values,
so if you use double quotes:
$sql = SELECT Username, Count( Username ) FROM MainDetails, Usernames
WHERE MainDetails.UserID = Usernames.UserID and Date Between '$Date1' and
'$Date2' GROUP BY Username;
it will work.

Regards, Jigal



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



Re: Setting variables on update

2004-02-24 Thread Bill Easton
The following works on 4.0.16, for those of us who'd like to stick to the
stable release:

update controltable set nextid = 1 + (@prevval := nextid)

Note.  There was a problem with this in 4.0.13--namely, the value of
@prevval sometimes was garbage.  I reported this via the list, but got no
response--however, the problem seems to have gone away in 4.0.14.

-Original Message-
From: [EMAIL PROTECTED]
Subject: RE: Setting variables on update
Date: Mon, 23 Feb 2004 11:50:38 -0700

Try this...works on 4.1.2

UPDATE  ControlTable SET NextID=3D 1 + (select @prevval :=3D NextID)

Ed

-Original Message-
From: Sasha Pachev [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 11:19 AM
To: Matt Fagan
Cc: [EMAIL PROTECTED]
Subject: Re: Setting variables on update


Matt Fagan wrote:
 Hello,
=20
 I'm trying to run an SQL update statement like:
=20
 UPDATE ControlTable SET @prevval :=3D NextID, NextID =3D NextID
 + 1
=20
 I've tried using a range of different syntax, but nothing
 seems to work. This is something that does work in another
 SQL server I used to use.
=20
 Does anybody know if this is something MySQL can do, and if
 so, what is the correct syntax? Note that I can't use an
 autoincrement column because the IDs aren't being put into
 a database.
=20
 I've searched through MySQL docs and mailing lists but
 couldn't find any mention of this. Any help would be
 appreciated.

A UDF or your own static function might work. Worst case, MySQL source
can be=20
modified to make this work.


--=20
Sasha Pachev
Create online surveys at http://www.surveyz.com/


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



RE: install problem

2004-02-24 Thread Maria Yndefors
Hi,
No I have not have MySql installed before and I am using version 1.4,
but I used an my.cnf from another host with mysql 3.x

Now I can't even manage to start it I get the following in the log file

040224 14:39:01  mysqld started
040224 14:39:04  InnoDB: Started
040224 14:39:04  Fatal error: Can't open privilege tables: Can't find
file: './mysql/host.frm' (errno: 13)
040224 14:39:04  Aborting

040224 14:39:04  InnoDB: Starting shutdown...
040224 14:39:06  InnoDB: Shutdown completed
040224 14:39:06  /usr/sbin/mysqld-max: Shutdown Complete

040224 14:39:07  mysqld ended

After installing it the first time I did not manage to log in as root to
change the password.
Is there some way to reset everything uninstall mysql and start all over
from the beginning again?

Best Regards
/maria

-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED] 
Sent: den 24 februari 2004 11:15
To: [EMAIL PROTECTED]
Subject: Re: install problem

Maria Yndefors [EMAIL PROTECTED] wrote:
 Hi, Thanks for the fast reply,
 
 I have not set the root password and I get the same result
 
 [EMAIL PROTECTED] gms]# mysql -u root -p
 Enter password:
 ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
 NO)
 

Do you have installed MySQL server before? Seems MySQL server uses old
data dir.

You can reset root password: start MySQL server with --skip-grant-tables
option, set up new password for root and restart MySQL server or just
reload privilege tables. More detailed instruction you can find at:
http://www.mysql.com/doc/en/Resetting_permissions.html


-- 
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





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


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



Re: how big can Query Cache get?

2004-02-24 Thread Egor Egorov
MySQL baby [EMAIL PROTECTED] wrote:
 Anyone using TONS of Query Cache for a high-traffic site?
 
 Our search server is really sweating.
 I was about to jump through a LOT of software loops to program
 query caching at the app level, when I realized that MySQL had
 it built-in already.  (We're using newest: 4.0.18)
 
 Seems we've got plenty of Qcache_free_memory (see below) - so
 I'm wondering...
 
 Has anyone set their query_cache_size= setting really high 
 like 1GB of RAM - to see how it helps?

You can set query_cache_size to 1Gb, but this can causes slight performance drop 
because MySQL will need to manage more memory. You better let MySQL manage memory by 
using Qcache_lowmem_prunes variable.

 
 Any more articles or info on this besides the docs at
 http://www.mysql.com/doc/en/Query_Cache.html ?
 
 
 
 
 | Key_blocks_used  | 29625  |
 | Key_read_requests| 31993562   |
 | Key_reads| 28450  |
 | Key_write_requests   | 204631 |
 | Key_writes   | 131756 |
 | Max_used_connections | 140|
 | Not_flushed_key_blocks   | 0  |
 | Not_flushed_delayed_rows | 0  |
 | Open_tables  | 100|
 | Open_files   | 146|
 | Open_streams | 0  |
 | Opened_tables| 106|
 | Questions| 1337108|
 | Qcache_queries_in_cache  | 11363  |
 | Qcache_inserts   | 530809 |
 | Qcache_hits  | 520845 |
 | Qcache_lowmem_prunes | 0  |
 | Qcache_not_cached| 1984   |
 | Qcache_free_memory   | 255088000  |
 | Qcache_free_blocks   | 4773   |
 | Qcache_total_blocks  | 27515  |



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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



Re: Why Doesn;t this Date Query Work?

2004-02-24 Thread Scott Bailey
Fantastic! This was indeed the problem and has solved it. Many thanks!


On Tue, 24 Feb 2004 13:14:51 +0100, Jigal van Hemert wrote:

 $sql = 'SELECT Username, Count( Username ) FROM MainDetails, Usernames
 WHERE MainDetails.UserID = Usernames.UserID and Date Between \'$Date1\'
 and \'$Date2\' GROUP BY Username';

 The strange thing is if I replace the $Date2 variable with a date manually
 it works -. i.e.
 
 Not a MySQL issue, but an error in your PHP code. Single quotes do NOT
 replace variables with their values,
 so if you use double quotes:
 $sql = SELECT Username, Count( Username ) FROM MainDetails, Usernames
 WHERE MainDetails.UserID = Usernames.UserID and Date Between '$Date1' and
 '$Date2' GROUP BY Username;
 it will work.
 
 Regards, Jigal



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



ERROR 1170 (42000): BLOB/TEXT column 'colname' used in key specif ication without a key length

2004-02-24 Thread Rughwani, Devashish (Devashish)
Hi 

Is it possible to make a column of TEXT data type as PRIMARY key ?

How to give the lenght for the below error ?
ERROR 1170 (42000): BLOB/TEXT column 'colname' used in key specification
without a key length

Thanks 
Devashish Rughwani

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



Re: install problem

2004-02-24 Thread Victoria Reznichenko
Maria Yndefors [EMAIL PROTECTED] wrote:
 Hi,
 No I have not have MySql installed before and I am using version 1.4,
 but I used an my.cnf from another host with mysql 3.x
 
 Now I can't even manage to start it I get the following in the log file
 
 040224 14:39:01  mysqld started
 040224 14:39:04  InnoDB: Started
 040224 14:39:04  Fatal error: Can't open privilege tables: Can't find
 file: './mysql/host.frm' (errno: 13)
 040224 14:39:04  Aborting
 
 040224 14:39:04  InnoDB: Starting shutdown...
 040224 14:39:06  InnoDB: Shutdown completed
 040224 14:39:06  /usr/sbin/mysqld-max: Shutdown Complete
 
 040224 14:39:07  mysqld ended

$ perror 13
Error code  13:  Permission denied

Check privileges on the data dir. MySQL should be owner of the data dir.

 After installing it the first time I did not manage to log in as root to
 change the password.
 Is there some way to reset everything uninstall mysql and start all over
 from the beginning again?

If you want re-create grant tables, you should remove files from directory of the 
database 'mysql' and then run mysql_install_db script.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





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



RE: install problem

2004-02-24 Thread Maria Yndefors
Thanks for the help, changing the privileges and resetting the root
password I managed to log in.
Best Regards
/Maria Yndefors

-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED] 
Sent: den 24 februari 2004 14:14
To: [EMAIL PROTECTED]
Subject: Re: install problem

Maria Yndefors [EMAIL PROTECTED] wrote:
 Hi,
 No I have not have MySql installed before and I am using version 1.4,
 but I used an my.cnf from another host with mysql 3.x
 
 Now I can't even manage to start it I get the following in the log
file
 
 040224 14:39:01  mysqld started
 040224 14:39:04  InnoDB: Started
 040224 14:39:04  Fatal error: Can't open privilege tables: Can't find
 file: './mysql/host.frm' (errno: 13)
 040224 14:39:04  Aborting
 
 040224 14:39:04  InnoDB: Starting shutdown...
 040224 14:39:06  InnoDB: Shutdown completed
 040224 14:39:06  /usr/sbin/mysqld-max: Shutdown Complete
 
 040224 14:39:07  mysqld ended

$ perror 13
Error code  13:  Permission denied

Check privileges on the data dir. MySQL should be owner of the data dir.

 After installing it the first time I did not manage to log in as root
to
 change the password.
 Is there some way to reset everything uninstall mysql and start all
over
 from the beginning again?

If you want re-create grant tables, you should remove files from
directory of the database 'mysql' and then run mysql_install_db script.


-- 
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





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


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



Re: ERROR 1170 (42000): BLOB/TEXT column 'colname' used in key specif

2004-02-24 Thread Victoria Reznichenko
Rughwani, Devashish (Devashish) [EMAIL PROTECTED] wrote:
 
 Is it possible to make a column of TEXT data type as PRIMARY key ?
 
 How to give the lenght for the below error ?
 ERROR 1170 (42000): BLOB/TEXT column 'colname' used in key specification
 without a key length
 

For BLOB/TEXT column you can create index only on the prefix of column. For example:

mysql CREATE TABLE t1(
- mytext TEXT,
- PRIMARY KEY (mytext(100)));
Query OK, 0 rows affected (0.01 sec)



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





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



some replication questions

2004-02-24 Thread Issac Goldstand
Hi list,
  I'm trying to get mysql replication set up for a distributed development
environment.  The master is the production server, whereas the slaves are
part of the developers' sandboxes (on their own machines).

The master machine is using MySQL 4.0.15, the slaves a nice mix of 4.0.15+
and 4.1.1

Some questions:
1) If the master has other databases for other applications, how can I set
up the slaves to only replicate the relevant databases?
2) If the slave changes data, is there any preferred way to revert to what
the master has? or just drop table; load table from master;?
3) The master currently slurps in rather large amounts of data via load data
from file on a daily basis (actually it imports the same data into a few
tables - including temporary and processes it in different ways from each
one).  This (I think it's this) is leading to a huge discrepency in the size
of the databases on the master, and the size of the binlog on the master...
currently the master's databases take up about 100MB, but the binlogs take
up close to 1GB!!!  Is there any way to safely roll-over the binlogs to
clear up space?
4) I'd like for the slaves to authenticate and replicate over SSL, but the
SSL documentation seems a bit sketchy...  I've got SSL support set up on the
master (I think I do - I have no idea how to test it), and I added
MASTER_SSL=1 to the slave when I did CHANGE MASTER, but I have no clue how
to test it.
5) (Last but not least) I'm getting a funny error message on one of the
slaves:
040224 14:00:51  Slave: Error 'There is no such grant defined for user
'irep1000
1' on host '%'' on query 'REVOKE ALL PRIVILEGES ON *.* FROM
irep10001@%'. De
fault database: 'mysql', Error_code: 1141

I've got no clue what it's trying todo - I thought that the grant tables
were not replicated ever?

Thanks in advance for any pointers!

  Issac



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



Re: HEAP tables vs MYISAM on ramdisk

2004-02-24 Thread Sasha Pachev
Mark Maunder wrote:
The table I'm using is non-critical data, so it's not really an issue
for me. But I was browsing through the mysql manual looking for a way to
rebuild an MYI file from the .frm and MYD file (is there a way?) when I
came across this:
There is:

REPAIR TABLE t1 USE_FRM

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: about PHP user interface

2004-02-24 Thread Sreekandh Iyer
embedding PHP scripts in between your HTML tags .. use vi or emacs
editor 


:-)
sree

On Tue, 2004-02-24 at 11:44, Togochog Enhebatu wrote:
 hi,
 
 I am new in PHP, and I would like to create some user interface with PHP. 
 Could anyone tell me what is the easiest way to do this?
 
 thanks a lot,
 
 Enhebatu
 
 _
 Store more e-mails with MSN Hotmail Extra Storage  4 plans to choose from! 
 http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 



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



Re: encoding question

2004-02-24 Thread Sasha Pachev
[EMAIL PROTECTED] wrote:


I wrote a cold fusion script to migrate data from an access 2000 db to a
mysql 4.0.18 db  and when I display the data with cold fusion I see these
little box characters in different spots.
I'm assuming that it's an issue with the encoding.  How do I correct this?
Looks like you might have some garbage characters in the data for one reason or 
another. First find out what characters those are:

mysql -e select garbage_col from t  /tmp/garbage-col.txt
then view the file in a hex editor
Once you know the trouble characters:

update t1 set garbage_col = replace(garbage_col,char(garbage_ascii),'')

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Create database error

2004-02-24 Thread Sasha Pachev
Colin O'Connor wrote:
Hi,

I'm bundling MySQL with a Java app, and it is currently working on Windows
and Mac OS X. Right now I'm porting it to Solaris.
The problem I'm having is when I try to create a database (CREATE DATABASE
mydb) I get the error: ERROR 1006: Can't create database 'mydb'. (errno:
2)
Using perror, errno: 2 means No such file or directory.

Does anyone know why it might be giving me that error?
Possibly some symlink problem or a file system error of some kind. Try

cd datadir
mkdir mydb
If the above works, create database should also.

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: rpm upgrade file conflict

2004-02-24 Thread Sasha Pachev
Jim Austin wrote:
Hello Folks,
Am trying to upgrade MySQL with rpms.  rpm -Uvh 
MySQL-shared-compat-4.0.17-0i386.rpm worked fine.  When I try to upgrade 
the client or server I get warnings that the files conflict with the 
older versions that are currently installed.  I've tried to erase the 
older versions with rpm -e to no avail. What should I be doing to get a 
clean installation?
Thanks for the help!
Use --force --nodeps

MySQL will work fine as long as you get all the new files in place by some 
method - rpm is just being a little fussy on you.

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


German Language characters storage.

2004-02-24 Thread Michael Johnson
Can MySQL store German characters such as ä,  o,  u and ß 
 



Thinking the Problem all the way through


Michael Johnson
Managing Director   Humphrey Consulting Limited BPEnet
13 Austin Friars
London
EC2N 2JX
[EMAIL PROTECTED]   
tel: 
fax: 
mobile: +44 (0)870 922 0247
+44 (0)1323 419554
07710 858586


 http://www.plaxo.com/signature Powered by Plaxo
http://www.plaxo.com/signature Want a signature like this?
 https://www.plaxo.com/add_me?u=21474856179v0=37641k0=318971277 Add
me to your address book...  
 


mysql stable release with UTF-8

2004-02-24 Thread Eric Daspet
Hi

I have an application which uses Mysql 3.23 and a latin1 character set. 
In a near future I will have to deal with texts in french, italian, 
korean and japonese. I'm looking into UTF-8 for mysql.

I did not see anything which enable UTF-8 for mysql 3.23 or 4.0 : 
character set list does not include utf8.
The only work-around I've seen is to multiply by 4 the column size (one 
character can be up to 4 bytes in utf8) and store text as some binary 
data. I do not care about size constraints but as a UTF-8 text can be 
coded in more than one way, I expect comparisons, search and tests 
problems when dealing with utf8 texts. This is not really acceptable.

- Is there a way to enable the server (3.23 or 4.0) to use UTF8 ? i do 
not need the mysql 4.1 character set switching capabilities, staying 
always int UTF8 with no conversion is fine for me.

- If there is no way to make mysql 3.23 or 4.0 handle UTF8, do someone 
have a work-around other than mine ?

- If there is no work-around, can someone tell me a release date for 
mysql 4.1 as stable ? I know there is no fixed date, I only need some 
bet for an aproximation : 2 weeks, 2 month, 6 month, 1 year, 2 years ?

Thanks in advance for any help you could give me.
--
Eric Daspet
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


disabling optimizations to identify slow queries

2004-02-24 Thread Bill Marrs
I've found a performance issue with a series of mysql queries that I make 
to generate a web page.  But, when I go to investigate it, reloading the 
page a few times, I find the performance of the pages within a couple tries 
becomes very fast.

So, it's hard to track down and work on the queries that are slow, since 
they do not remain slow.

Unfortunately, the page is still slow fairly often, so this doesn't help my 
real problem.

On my test server, I've tried disabling some optimizations in the server 
parameters, to see if I could get a more reproducible case (figuring that 
query caching and/or the key buffer could be resulting in repeated queries 
being optimized):

set-variable = query_cache_type=0
set-variable = key_buffer_size=0
...but, I haven't managed to reproduce the slow queries reliably.

Does anything know what might be going on and if there's some setting I can 
use to make my performance issue more reproducible?

Am I missing something?

-=bill

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


RE: disabling optimizations to identify slow queries

2004-02-24 Thread Mike Johnson
From: Bill Marrs [mailto:[EMAIL PROTECTED]

 I've found a performance issue with a series of mysql queries 
 that I make to generate a web page.  But, when I go to 
 investigate it, reloading the page a few times, I find the 
 performance of the pages within a couple tries becomes very 
 fast.


It sounds like query caching is working against you.

There are a variety of ways to get around it. While it'll be a PITA, you may want to 
have you script call `RESET QUERY CACHE` at the begining, and then include 
`SQL_NO_CACHE` in your SELECT statement(s).

More info here:
http://www.mysql.com/doc/en/Query_Cache_Status_and_Maintenance.html

And here:
http://www.mysql.com/doc/en/SELECT.html

HTH!


-- 
Mike Johnson
Web Developer
Smarter Living, Inc.
phone (617) 886-5539

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



Re: disabling optimizations to identify slow queries

2004-02-24 Thread vpendleton
Are you logging slow queries? Have you run an explain plan for the 
queries in question?

 Original Message 

On 2/24/04, 10:29:33 AM, Bill Marrs [EMAIL PROTECTED] wrote regarding 
disabling optimizations to identify slow queries:


 I've found a performance issue with a series of mysql queries that I make
 to generate a web page.  But, when I go to investigate it, reloading the
 page a few times, I find the performance of the pages within a couple 
tries
 becomes very fast.

 So, it's hard to track down and work on the queries that are slow, since
 they do not remain slow.

 Unfortunately, the page is still slow fairly often, so this doesn't help 
my
 real problem.


 On my test server, I've tried disabling some optimizations in the server
 parameters, to see if I could get a more reproducible case (figuring that
 query caching and/or the key buffer could be resulting in repeated 
queries
 being optimized):

 set-variable = query_cache_type=0
 set-variable = key_buffer_size=0

 ...but, I haven't managed to reproduce the slow queries reliably.

 Does anything know what might be going on and if there's some setting I 
can
 use to make my performance issue more reproducible?

 Am I missing something?


 -=bill


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

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



bdb tables: calculating an appropriate value for bdb_max_lock

2004-02-24 Thread Jim Hopp
(Asking again)

After running in production for about seven weeks, our dumps on one of 
our BDB tables performed with 'mysqldump --opt' began failing with the 
message: 'mysqldump: Error 1030: Got error 12 from table handler when 
dumping table `reference` at row: 255233'.  The table has about 265,000 
rows.

Reviewing the error log and the MySQL doc, I see that that error message 
means that we should increase the bdb_max_lock variable from its default 
of 1.  But nowhere can I find an algorithm for calculating an 
appropriate value.  Can anyone point me to some information on this?

(I gather, since --opt means --lock-tables and BDB tables are locked at 
the page level that I'll need enough locks to cover all the pages in the 
largest table.  How can I determine how many pages are in a table?)

Thanks,

Jim Hopp

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


Re: UTF-8

2004-02-24 Thread Yves Goergen
Hi Beau,

basically, you can use anything from MySQL 3.x, as you like it. I'm on an
Internet Newsboard System for a while and switched that to UTF-8 for all
data handling, display and storage. (Even sending out UTF-8 e-mails and
Jabber messages...) You just have to give MySQL the UTF-8 encoded string,
there's no problem with that.

But there is one exception I have found by now: You may experience problems
with sorting of non-ANSI characters. They will be sorted by their byte
values, with no respect to multibyte characters (except from MySQL 4.1 on).
If that's not a too big problem for you, it should work anyway. (You could
check the sorted output and re-sort them manually...)

And there's another problem with it: FULLTEXT indices might cause problems
with words containing non-ANSI characters, specifically, MySQL won't index
them (AFAIK).

-- 
Yves Goergen
[EMAIL PROTECTED]
Please don't CC me (causes double mails)


On Monday, February 23, 2004 11:48 PM CET, Beau Hartshorne wrote:
 Hi,

 I am about to start using UTF-8 for my internal data storage and
 display
 for a CMS that I'm building. Are there any issues that I should be
 aware
 of related to mysql and storing UTF-8 encoded characters? What
 versions
 of mysql offer full UTF-8 support, and are there any weird caveats
 with
 the implementation?

 Thank you,

 Beau


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



Union EXACT Tables

2004-02-24 Thread Lorderon
Hello All,

Is there a way to make concat 2 tables together without using UNION ?
The tables are EXACTLY SAME, but they sit on 2 different DBs.
And I want to run the SAME where clause on both tables...

Thanks in advance,
-Lorderon.



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



RE: disabling optimizations to identify slow queries

2004-02-24 Thread Bill Marrs
At 11:35 AM 2/24/2004, Mike Johnson wrote:
It sounds like query caching is working against you.

There are a variety of ways to get around it. While it'll be a PITA, you 
may want to have you script call `RESET QUERY CACHE` at the begining, and 
then include `SQL_NO_CACHE` in your SELECT statement(s).
I had thought that setting this in /etc/my.cnf (and restarting mysql) would 
disable the query cache:

set-variable = query_cache_type=0

I'll try the RESET as well, to make sure.

Actually, I just noticed that even after I restart mysql, the speed 
stays.  That doesn't make any sense, maybe there is some other unknown 
factor influencing this.



At 11:39 AM 2/24/2004, [EMAIL PROTECTED] wrote:
Are you logging slow queries? Have you run an explain plan for the
queries in question?
Yes, but the problem is more that I'm doing a number of not-super-fast 
queries, so the accumulated effect is slow, but each query generally isn't 
that slow.

Yes, I'm using explain... that's usually how I work on slow querys, run 
explain, try adding and index, etc.  These queries already have indexes, 
but in some cases they aren't fast.



-bill

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


INSERT returning ID

2004-02-24 Thread David Scott
Hi list peeps
In many of my projects I have the need to insert a new record into a table and then 
later on in the script update this record, Right now I am doing this by doing the 
insert, then immediately doing a Select to return the latest id (unique id) which I 
store later for my update.

Is there any way I can do an insert and have it return the unique auto-assigned id? 

Cheers 
Dave

RE: GROUP BY across UNION

2004-02-24 Thread John McCaskey
Nope, this would yield a 'Column: 'avg' in field list is ambiguous'
error.  I'm still trying to work out a better way of doing this.  I also
need to get standard deviations now, and the method I mentioned in my
original post doesn't even work for that.  So now I'm left with actually
getting all the values and computing them in code.  Very sub optimal.

John A. McCaskey


-Original Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 18, 2004 6:30 PM
To: [EMAIL PROTECTED]
Subject: Re: GROUP BY across UNION


I am pretty new myself but can't you do it with a join? Like SELECT
AVG(avg) FROM table_a, table_b GROUP BY id_field.

Respectfully,
Ligaya Turmelle

John McCaskey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
First of all I am using mysql 4.0.18 and I am not free to upgrade to 4.1
or 5.0.



I have two tables:



table_a, and table_b these two tables have the same structure:

CREATE table_a (

  id_field mediumint(8) unsigned NOT NULL,

  avg float default NULL

)



What I want to do is get the combined avg across table_a and table_b for
each id value.  So I tried doing

(SELECT AVG(avg) FROM table_a)

UNION

(SELECT AVG(avg) FROM table_b)

GROUP BY id_field;



This however doesn't work.  I can see why this is thinking about how a
union should work mathematically but I'm left with no apparent way to
directly get the avg across two tables.  I know that I can take the avg
from each along with the row count and then do a weighted average using
those values, but I'd prefer not to have to do that.  Any suggestions or
am I stuck doing individual group bys on each table uninoning the
results and then doing weighted averages on the matching pairs?



Here is what I'm talking about doing with the weighted averages incase
it is unclear:

(SELECT AVG(avg) AS avg_a, COUNT(id_field) AS count_a FROM table_a GROUP
BY id_field)

UNION

(SELECT AVG(avg) AS avg_b, COUNT(id_field) AS count_b FROM table_b GROUP
BY id_field);



Then I would match up the results and compute total_avg = (avg_a*count_a
+ avg_b*count_b)/(count_a+count_b).  This is not nearly as clean as I
would like.







John A. McCaskey






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


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



RE: disabling optimizations to identify slow queries

2004-02-24 Thread Keith C. Ivey
On 24 Feb 2004 at 12:00, Bill Marrs wrote:

 Actually, I just noticed that even after I restart mysql, the speed
 stays.  That doesn't make any sense, maybe there is some other unknown
 factor influencing this.

Sounds like it's your operating system's caching of the disk reads.

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org


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



Help with a query

2004-02-24 Thread Gregory A. Swarthout
Suppose I have two tables like this:

keystone_storesmanagers
  
=
 id | store_nameid | manager_name  | manager_type |
store_id
+---  
+---+--+-
 AA | Wilshire's Oakland 1 | Fred Williams | 1| AA
 FR | Wilshire's Redmond 2 | Janice Plain  | 2| AA
 LI | Dan's Food  Drug  3 | Janet Gilmore | 1| FR
 4 | Nick Woolstune| 2| FR
 5 | Ken Jennings  | 1| LI
 6 | Fred Muelmann | 2| LI

Given that there will be exactly one of each of the two types of managers
per
store, is there a way to write a query that will generate the following
result
set?

store_name | type_1_manager | type_2_manager
---++---
Wilshire's Oakland | Fred Williams  | Janice Plain
Wilshire's Redmond | Janet Gilmore  | Nick Woolstune
Dan's Food  Drug  | Ken Jennings   | Fred Muelmann

Can this be done in a single query?

Greg

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



Re: Union EXACT Tables

2004-02-24 Thread Paul DuBois
At 19:04 +0200 2/24/04, Lorderon wrote:
Hello All,

Is there a way to make concat 2 tables together without using UNION ?
The tables are EXACTLY SAME, but they sit on 2 different DBs.
And I want to run the SAME where clause on both tables...
What's the problem with using UNION?

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: INSERT returning ID

2004-02-24 Thread Paul DuBois
At 17:02 + 2/24/04, David Scott wrote:
Hi list peeps
In many of my projects I have the need to insert a new record into a 
table and then later on in the script update this record, Right now 
I am doing this by doing the insert, then immediately doing a Select 
to return the latest id (unique id) which I store later for my 
update.

Is there any way I can do an insert and have it return the unique 
auto-assigned id?
If you mean, can you have the insert statement itself return the ID,
no.  Insert statements don't return records.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Union EXACT Tables

2004-02-24 Thread Lorderon
Paul DuBois [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 19:04 +0200 2/24/04, Lorderon wrote:
 Is there a way to make concat 2 tables together without using UNION ?
 The tables are EXACTLY SAME, but they sit on 2 different DBs.
 And I want to run the SAME where clause on both tables...

 What's the problem with using UNION?

It's quite slow, when I have large tables.. Here I got the same tables and I
want to run the same where clause, so mabye there's something faster that I
can use?


Thanks,
-Lorderon



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



Re: INSERT returning ID

2004-02-24 Thread vpendleton
You could try creating a function in Java or C/C++ or whatever your 
preference is that wraps the select statements up for you and returns the 
insert ID.

 Original Message 

On 2/24/04, 11:02:51 AM, David Scott [EMAIL PROTECTED] wrote regarding 
INSERT returning ID:


 Hi list peeps
 In many of my projects I have the need to insert a new record into a
 table and then later on in the script update this record, Right now I am
 doing this by doing the insert, then immediately doing a Select to
 return the latest id (unique id) which I store later for my update.

 Is there any way I can do an insert and have it return the unique
 auto-assigned id?

 Cheers
 Dave

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



Re: Union EXACT Tables

2004-02-24 Thread vpendleton
Would creating a merge table be a solution for you?

 Original Message 

On 2/24/04, 11:04:53 AM, Lorderon [EMAIL PROTECTED] wrote regarding 
Union EXACT Tables:


 Hello All,

 Is there a way to make concat 2 tables together without using UNION ?
 The tables are EXACTLY SAME, but they sit on 2 different DBs.
 And I want to run the SAME where clause on both tables...

 Thanks in advance,
 -Lorderon.



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

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



RE: disabling optimizations to identify slow queries

2004-02-24 Thread Bill Marrs
At 12:07 PM 2/24/2004, Keith C. Ivey wrote:
Sounds like it's your operating system's caching of the disk reads.
Yikes... that would explain it.

um... anyone know how to disable disk caching on Linux 2.6 kernel?

-bill

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


Re: Union EXACT Tables

2004-02-24 Thread Paul DuBois
At 19:18 +0200 2/24/04, Lorderon wrote:
Paul DuBois [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 19:04 +0200 2/24/04, Lorderon wrote:
 Is there a way to make concat 2 tables together without using UNION ?
 The tables are EXACTLY SAME, but they sit on 2 different DBs.
 And I want to run the SAME where clause on both tables...
 What's the problem with using UNION?
It's quite slow, when I have large tables.. Here I got the same tables and I
want to run the same where clause, so mabye there's something faster that I
can use?
Are your tables indexed?

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Help with a query

2004-02-24 Thread Ted . A . Gifford
Sounds like you want to do:

Select store_name, t1mgr.manager_name as 'type_1_manager',
t2mgr.manager_name as 'type_2_manager'
From (keystone_stores ks left join managers t1mgr on ks.id = t1mgr.store_id
and t1mgr.manager_type = 1) 
Left join managers t2mgr on ks.id = t2mgr.store_id 
and t2mgr.manager_type = 2

Does that fit the bill?

Ted Gifford

-Original Message-
From: Gregory A. Swarthout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 24, 2004 9:09 AM
To: [EMAIL PROTECTED]
Subject: Help with a query

Suppose I have two tables like this:

keystone_storesmanagers
  
=
 id | store_nameid | manager_name  | manager_type |
store_id
+---  
+---+--+-
 AA | Wilshire's Oakland 1 | Fred Williams | 1| AA
 FR | Wilshire's Redmond 2 | Janice Plain  | 2| AA
 LI | Dan's Food  Drug  3 | Janet Gilmore | 1| FR
 4 | Nick Woolstune| 2| FR
 5 | Ken Jennings  | 1| LI
 6 | Fred Muelmann | 2| LI

Given that there will be exactly one of each of the two types of managers
per
store, is there a way to write a query that will generate the following
result
set?

store_name | type_1_manager | type_2_manager
---++---
Wilshire's Oakland | Fred Williams  | Janice Plain
Wilshire's Redmond | Janet Gilmore  | Nick Woolstune
Dan's Food  Drug  | Ken Jennings   | Fred Muelmann

Can this be done in a single query?

Greg

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

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



Re: INSERT returning ID

2004-02-24 Thread Jeff Mathis
but there are ways to get this value. The Java API handles this case 
just fine, and I'd be willing to bet other API's do it as well.

here's some simple code to do with the Java API:

String sql = some insert sql statement;
Statement stmt = getConnection().createStatement();
stmt.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS);
ResultSet rs = stmt.getGeneratedKeys();
setId(rs.getInt(1)); -- this is the auto_generated row id
stmt.close();
Paul DuBois wrote:
At 17:02 + 2/24/04, David Scott wrote:

Hi list peeps
In many of my projects I have the need to insert a new record into a 
table and then later on in the script update this record, Right now I 
am doing this by doing the insert, then immediately doing a Select to 
return the latest id (unique id) which I store later for my update.

Is there any way I can do an insert and have it return the unique 
auto-assigned id?


If you mean, can you have the insert statement itself return the ID,
no.  Insert statements don't return records.



--
Jeff Mathis, Ph.D.  505-955-1434
The Prediction Company  [EMAIL PROTECTED]
525 Camino de los Marquez, Ste 6http://www.predict.com
Santa Fe, NM 87505
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: INSERT returning ID

2004-02-24 Thread Paul DuBois
At 10:25 -0700 2/24/04, Jeff Mathis wrote:
but there are ways to get this value. The Java API handles this case 
just fine, and I'd be willing to bet other API's do it as well.
I know that, but that isn't what he asked.


here's some simple code to do with the Java API:

String sql = some insert sql statement;
Statement stmt = getConnection().createStatement();
stmt.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS);
ResultSet rs = stmt.getGeneratedKeys();
setId(rs.getInt(1)); -- this is the auto_generated row id
stmt.close();
Paul DuBois wrote:
At 17:02 + 2/24/04, David Scott wrote:

Hi list peeps
In many of my projects I have the need to insert a new record into 
a table and then later on in the script update this record, Right 
now I am doing this by doing the insert, then immediately doing a 
Select to return the latest id (unique id) which I store later for 
my update.

Is there any way I can do an insert and have it return the unique 
auto-assigned id?


If you mean, can you have the insert statement itself return the ID,
no.  Insert statements don't return records.


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Union EXACT Tables

2004-02-24 Thread Lorderon
Thanks for your help... appreciate it...

MERGE table type is what I searched for :-)


Thanks
-Lorderon



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



Grant Tables MySQL 4.1 - Bug: 2915

2004-02-24 Thread Sabine Seipel
hi,

what's about http://bugs.mysql.com/bug.php?id=2915 [Bug: Installation of
Grant Tables failed!] ??
I have the same problem, how it described in this bug report. but nobody
could say me if this is a bug or merely a mistake on my part. 

I would be really great if anybody could answer, because I want to work with
MySQL 4.1...

Best regards
Sabine Seipel

-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++


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



Inserting values with ;. How?

2004-02-24 Thread Tenchi Muyou
Hello there guys,

	I needed to transfer my db from one MySql server to another, and 
exported the table in a .sql file. The problem is that when i try to 
import it gives an error. Here is the code that is giving the error:

INSERT INTO `phpbb_posts_text` (`post_id`, `bbcode_uid`, `post_subject`, 
`post_text`) VALUES (37, '72f05c5c1f', '', 'Serve Blog: O-o;;\r\nTá 
desatualizado, mas peguem o endereço na sain XDD\r\n\r\npra quem é 
preguicoso \r\n\r\n[url=http://protection.dydnds.org]Protection 
Project[/url]');

	How can I escape this ;; from the message? I tried \; but it wont work. 
Searched the documentation and couldnt find anything that could help. 
Any ideias?

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


Updating a Record

2004-02-24 Thread Jacque Scott
I am converting from Access 2.0 to MySQL and I am going through all of
my code to make it compatible with MySQL.  I was testing my Update for
one of my queries and I don't know if I found a bug or if MySQL was
designed to do this.
 
In my program I pass an UPDATE string to MySQL.  There can be times
when there really isn't anything to UPDATE but the string is passed
anyway.  In Access it would run the query and just overwrite everything.
 In MySQL it does nothing if there are no changes.  
Here is a sample UPDATE:
 
UPDATE tblQuotes SET CompanyContact= George Bush, CompanyName= Hello
There
WHERE (QuoteNumber= 55 AND Revision= Initial 
 
If the data in the DB is the same then nothing happens.  If I make a
change to either of the fields then it updates.  Was MySQL designed this
way?


RE: Help with a query

2004-02-24 Thread Gregory A. Swarthout
Quoting [EMAIL PROTECTED]:

 Sounds like you want to do:
 
 Select store_name, t1mgr.manager_name as 'type_1_manager',
 t2mgr.manager_name as 'type_2_manager'
 From (keystone_stores ks left join managers t1mgr on ks.id =
 t1mgr.store_id
 and t1mgr.manager_type = 1) 
 Left join managers t2mgr on ks.id = t2mgr.store_id 
 and t2mgr.manager_type = 2
 
 Does that fit the bill?

I think so.  Are the parantheses necessary?  Is the From just a typo?

Greg

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



MERGE table across InnoDB tables?

2004-02-24 Thread John McCaskey
I attempted to create a merge table across two identical InnoDB tables
and it seemed to work without error.  But when I went to use the table I
got a file not found my_table.MRG (error number 2) error.  The file does
in fact exist, but it is only 54 bytes. 

 

I'm guessing that I can only create a merge table with MyISAM tables.
Is this correct?  The manual says that a merge table is a collection of
MyISAM tables but it doesn't explicitly state that it doesn't work with
other types.

 

 

John A. McCaskey

 



Re: Help! How to handle Massive index file???

2004-02-24 Thread Eric B.
Thanks Sasha.  It helped trim down my table a bit

Eric

Sasha Pachev [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Eric B. wrote:
  Sure!  Here it is:
 
  CREATE TABLE `index2` (
  `id` varchar(50) NOT NULL default '',
  `recordid` varchar(20) NOT NULL default '',
  `transid` varchar(20) NOT NULL default '',
  `formid` varchar(20) NOT NULL default '',
  `groupid` varchar(20) NOT NULL default '',
  `clientid` varchar(20) NOT NULL default '',
  `userid` varchar(20) NOT NULL default '',
  `keyid` varchar(50) NOT NULL default '',
  `active_recordid` varchar(20) default NULL,
  `replacing` varchar(20) default NULL,
  `created` datetime default NULL,
  `lastmodified` datetime default NULL,
  `issaved` decimal(18,0) NOT NULL default '0',
  `isclosed` decimal(18,0) NOT NULL default '0',
  `isdeleted` decimal(18,0) NOT NULL default '0',
  `indexfield` varchar(50) default NULL,
  `indexvalue` varchar(200) default NULL,
  PRIMARY KEY (`id`),
 
  KEY `recordid_idxfield_idxvalue` (`recordid`,`indexfield`,`indexvalue`),
  KEY `indexfield_idxvalue` (`indexfield`,`indexvalue`),
  KEY `Fixed_fields_and_generic_fields`
 
(`recordid`,`transid`,`formid`,`clientid`,`active_recordid`,`issaved`,`isclo
  sed`,`isdeleted`,`indexfield`,`indexvalue`),
  KEY `recordid_idxfield_formid_activeRid_isvars_idxval`
 
(`recordid`,`indexfield`,`formid`,`active_recordid`,`issaved`,`isclosed`,`is
  deleted`,`indexvalue`),
  KEY `formid_idxfield_idxvalue` (`formid`,`indexfield`,`indexvalue`)
 
  ) TYPE=MyISAM

 Drop Fixed_fields_and_generic_fields and
 recordid_idxfield_formid_activeRid_isvars_idxval

 Most queries would probably not benefit from those in the presence of
other keys.

 Depending on the kind of queries you are running, you may want to
reorganize
 some of your keys. Good rule of thumb is if you have a key on (A,B,C) you
 usually do not need a key on (A,B), and if for each unique value of (A,B)
there
 are no  more than 10 matches, you do not usually need a key on (A,B,C).

 Disk trashing can happen on a keyed query if the records in the data file
are
 not in the same order as the ones in the key file. A certain order in the
data
 file can be forced with periodic runs of ALTER TABLE ORDER BY.

 -- 
 Sasha Pachev
 Create online surveys at http://www.surveyz.com/

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






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



Re: Inserting values with ;. How?

2004-02-24 Thread Paul DuBois
At 14:30 -0300 2/24/04, Tenchi Muyou wrote:
Hello there guys,

	I needed to transfer my db from one MySql 
server to another, and exported the table in a 
.sql file. The problem is that when i try to 
import it gives an error. Here is the code that 
is giving the error:

INSERT INTO `phpbb_posts_text` (`post_id`, 
`bbcode_uid`, `post_subject`, `post_text`) 
VALUES (37, '72f05c5c1f', '', 'Serve Blog: 
O-o;;\r\nTá desatualizado, mas peguem o endereço 
na sain XDD\r\n\r\npra quem é preguicoso 
\r\n\r\n[url=http://protection.dydnds.org]Protection 
Project[/url]');

	How can I escape this ;; from the 
message? I tried \; but it wont work. Searched 
the documentation and couldnt find anything that 
could help. Any ideias?
You omitted some important information:

1) What method are you using to import the file?
2) What was the exact error message?
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Help with a query

2004-02-24 Thread Ted . A . Gifford
I think you may have introduced the From typo, but it is one regardless. I
don't think the parens are necessary. Try it out.

Ted Gifford

-Original Message-
From: Gregory A. Swarthout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 24, 2004 9:44 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Help with a query

Quoting [EMAIL PROTECTED]:

 Sounds like you want to do:
 
 Select store_name, t1mgr.manager_name as 'type_1_manager',
 t2mgr.manager_name as 'type_2_manager'
 From (keystone_stores ks left join managers t1mgr on ks.id =
 t1mgr.store_id
 and t1mgr.manager_type = 1) 
 Left join managers t2mgr on ks.id = t2mgr.store_id 
 and t2mgr.manager_type = 2
 
 Does that fit the bill?

I think so.  Are the parantheses necessary?  Is the From just a typo?

Greg

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



Re: Create database error

2004-02-24 Thread Eric B.
Might sound like a silly question, but have you checked the write
permissions to the data dir?  Am not sure if it is the mysql daemon that
needs write access or if it is the user logged on




Colin O'Connor [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I'm bundling MySQL with a Java app, and it is currently working on Windows
 and Mac OS X. Right now I'm porting it to Solaris.

 The problem I'm having is when I try to create a database (CREATE
DATABASE
 mydb) I get the error: ERROR 1006: Can't create database 'mydb'. (errno:
 2)

 Using perror, errno: 2 means No such file or directory.

 Does anyone know why it might be giving me that error?

 Thanks,
 Colin


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







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



Re: Updating a Record

2004-02-24 Thread Paul DuBois
At 9:36 -0800 2/24/04, Jacque Scott wrote:
I am converting from Access 2.0 to MySQL and I am going through all of
my code to make it compatible with MySQL.  I was testing my Update for
one of my queries and I don't know if I found a bug or if MySQL was
designed to do this.
In my program I pass an UPDATE string to MySQL.  There can be times
when there really isn't anything to UPDATE but the string is passed
anyway.  In Access it would run the query and just overwrite everything.
 In MySQL it does nothing if there are no changes. 
Here is a sample UPDATE:

UPDATE tblQuotes SET CompanyContact= George Bush, CompanyName= Hello
There
WHERE (QuoteNumber= 55 AND Revision= Initial
If the data in the DB is the same then nothing happens.  If I make a
change to either of the fields then it updates.  Was MySQL designed this
way?
Yes.

Depending on your client program, it may be possible to request
that UPDATE return a rows-matched count rather than a rows-changed
count.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: INSERT returning ID

2004-02-24 Thread Eric B.
I'm not 100% sure, but this type of programming would seem to be opening the
doors for bugs down the road that get difficult to trace and to track.  If
you are using a multi-threaded app, then you have to make sure that you
prevent any mods to the DB after your insert and before your select.  If you
are using transactions, this would be tantamount to a table-lock, which
might not be the most efficient solution.  Otherwise you risk that another
thread updates the DB or inserts another row before you can do your select
to retreive your record.

Instead of using MySQL to generate the unique id, why not generate it
yourself?  Then you would know ahead of time what value you are inserting.
There are different libs that exist that you can D/L to generate the unique
id for you, or you can create it yourself using a timestamp  random number
generator, or a simple counter synchronized across multiple threads.

From personal experience, I have found that the autonumbering of any DB is
mostly useful for the DB to ensure that it has a unique PK, but difficult to
use from the programmer's side of thing, b/c it requires an extra DB query
to get it every time.

Good Luck.

Eric


[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
You could try creating a function in Java or C/C++ or whatever your
preference is that wraps the select statements up for you and returns the
insert ID.

 Original Message 

On 2/24/04, 11:02:51 AM, David Scott [EMAIL PROTECTED] wrote regarding
INSERT returning ID:


 Hi list peeps
 In many of my projects I have the need to insert a new record into a
 table and then later on in the script update this record, Right now I am
 doing this by doing the insert, then immediately doing a Select to
 return the latest id (unique id) which I store later for my update.

 Is there any way I can do an insert and have it return the unique
 auto-assigned id?

 Cheers
 Dave

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







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



[Fwd: Re: Inserting values with ;. How?]

2004-02-24 Thread Tenchi Muyou
Sorry guys, i only seen i sent directly to Paul after i sent it ... 
Forwarding to the list.

 Original Message 
Subject: Re: Inserting values with ;. How?
Date: Tue, 24 Feb 2004 15:05:59 -0300
From: Tenchi Muyou [EMAIL PROTECTED]
To: Paul DuBois [EMAIL PROTECTED]
References: [EMAIL PROTECTED] 
[EMAIL PROTECTED]

Well... I'm trying to setup the new db on tripod/lycos UK.
Im trying both uploading the .sql file and running it, and cutting 
pasting the code into the server both says:
Error

SQL-query :  [Edit]

INSERT INTO `phpbb_posts_text` (`post_id`, `bbcode_uid`, `post_subject`,
`post_text`) VALUES (6, '33f8793c3d', 'Sejam todos bem vindos', 'É
isso ae povo!\r\n\r\nEstamos numa casa nova ^_~\r\n\r\nDesejo a
todos um bom re-começo XD~\r\n\r\nQualquer dúvida, é só contatar algum
administrador!!!\r\n\r\nBjokas e divirtam-se'),
(* cutted for easier reading*)
(35, '90a8725459', '', 'Nhoii\r\n\r\nseja bem vindo!\r\n\r\neu tb
sou do CB XD~\r\n\r\naproveite bastante aki ^^\r\n\r\nbjokas'),
(36, 'dd4ff5164a', '', 'E eu tb ^_^\r\n\r\nSeja bem vindo XDD'),
(37, '72f05c5c1f', '', 'Serve Blog: O-o
MySQL said:

You have an error in your SQL syntax near ''Serve Blog: O-o' at line 32

Paul DuBois wrote:
 At 14:30 -0300 2/24/04, Tenchi Muyou wrote:

 Hello there guys,

 I needed to transfer my db from one MySql server to another, and
 exported the table in a .sql file. The problem is that when i try to
 import it gives an error. Here is the code that is giving the error:

 INSERT INTO `phpbb_posts_text` (`post_id`, `bbcode_uid`,
 `post_subject`, `post_text`) VALUES (37, '72f05c5c1f', '', 'Serve
 Blog: O-o;;\r\nTá desatualizado, mas peguem o endereço na sain
 XDD\r\n\r\npra quem é preguicoso
 \r\n\r\n[url=http://protection.dydnds.org]Protection Project[/url]');

 How can I escape this ;; from the message? I tried \; but it wont
 work. Searched the documentation and couldnt find anything that could
 help. Any ideias?


 You omitted some important information:

 1) What method are you using to import the file?
 2) What was the exact error message?



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


Re: [Fwd: Re: Inserting values with ;. How?]

2004-02-24 Thread Paul DuBois
At 15:06 -0300 2/24/04, Tenchi Muyou wrote:
Sorry guys, i only seen i sent directly to Paul 
after i sent it ... Forwarding to the list.

 Original Message 
Subject: Re: Inserting values with ;. How?
Date: Tue, 24 Feb 2004 15:05:59 -0300
From: Tenchi Muyou [EMAIL PROTECTED]
To: Paul DuBois [EMAIL PROTECTED]
References: [EMAIL PROTECTED] 
[EMAIL PROTECTED]

Well... I'm trying to setup the new db on tripod/lycos UK.
Im trying both uploading the .sql file and running it, and cutting 
pasting the code into the server both says:
Error

SQL-query :  [Edit]

INSERT INTO `phpbb_posts_text` (`post_id`, `bbcode_uid`, `post_subject`,
`post_text`) VALUES (6, '33f8793c3d', 'Sejam todos bem vindos', 'É
isso ae povo!\r\n\r\nEstamos numa casa nova ^_~\r\n\r\nDesejo a
todos um bom re-começo XD~\r\n\r\nQualquer dúvida, é só contatar algum
administrador!!!\r\n\r\nBjokas e divirtam-se'),
(* cutted for easier reading*)
(35, '90a8725459', '', 'Nhoii\r\n\r\nseja bem vindo!\r\n\r\neu tb
sou do CB XD~\r\n\r\naproveite bastante aki ^^\r\n\r\nbjokas'),
(36, 'dd4ff5164a', '', 'E eu tb ^_^\r\n\r\nSeja bem vindo XDD'),
(37, '72f05c5c1f', '', 'Serve Blog: O-o
MySQL said:

You have an error in your SQL syntax near ''Serve Blog: O-o' at line 32
I tried copying and pasting from your original message, and didn't get
a syntax error. (I got unknown table, which is true on my machine, and
I wouldn't have gotten that if the server wasn't able to parse the statement
correctly.)
So I'm not sure what's going on with your setup, but I'd suspect some
problem with the copy and paste operation, and perhaps also with the
file transfer.  I do believe that the original statement is valid, however.


Paul DuBois wrote:
 At 14:30 -0300 2/24/04, Tenchi Muyou wrote:

 Hello there guys,

 I needed to transfer my db from one MySql server to another, and
 exported the table in a .sql file. The problem is that when i try to
 import it gives an error. Here is the code that is giving the error:
 INSERT INTO `phpbb_posts_text` (`post_id`, `bbcode_uid`,
 `post_subject`, `post_text`) VALUES (37, '72f05c5c1f', '', 'Serve
 Blog: O-o;;\r\nTá desatualizado, mas peguem o endereço na sain
 XDD\r\n\r\npra quem é preguicoso
 \r\n\r\n[url=http://protection.dydnds.org]Protection Project[/url]');
 How can I escape this ;; from the message? I tried \; but it wont
 work. Searched the documentation and couldnt find anything that could
 help. Any ideias?


 You omitted some important information:

 1) What method are you using to import the file?
 2) What was the exact error message?




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


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Bug on MYSQL-5.0 in statement OPTIMIZE TABLE

2004-02-24 Thread Sergei Golubchik
Hi!

On Feb 23, Gelu Gogancea wrote:
 Hi,
 TABLE CREATE DESCRIPTION :
 CREATE TABLE T1(IDAP INT(16),TVAL INT(2),CH_VAL_SEC
 INT(16),INDEX(IDAP),INDEX(TVAL),INDEX(CH_VAL_SEC));
 
 RUNNING CONDITIONS:
 -use persistent connection.

What do you mean persistent connection ?
Persistent PHP connections ?
 
 RUNNING SEQUENCE:
 1-Open 1-st connection.
 2-insert in table many values at once time with delayed option;
 insert delayed into T1 (IDAP,TVAL,CH_VAL_SEC) 
 VALUES(1,-2,100),(2,-3,101),(3,-4,102);
 3-I let 1-st connection open.Open 2-nd connection to execute the  next 2 statement.
 4-delete all data from table :
 delete from T1;
 5-optimize the table :
 optimize table T1;
 MySQL daemon crash on this last statement if i use PERSISTENT
 CONNECTION, otherwise is OK.

It doesn't crash for me when I use mysql command line client.
What MySQL client do you use - PHP ?

 From the mysql daemon log:
 
 040223 14:59:49  mysqld started
 040223 14:59:50  InnoDB: Started; log sequence number 0 43634
 040223 14:59:50  /mysql/mysql-5.0.bin/libexec/mysqld: Can't create/write to file 
 '/var/run/mysqld/mysqld.pid' (Errcode: 2)
 040223 14:59:50  Found 4.1 style password for user '[EMAIL PROTECTED]'. Ignoring 
 user. You should change password for this user.
 /mysql/mysql-5.0.bin/libexec/mysqld: ready for connections.
 Version: '5.0.0-alpha'  socket: '/mysql/mydatabase/mysql.sock'  port: 3306
 mysqld got signal 11;
 This could be because you hit a bug. It is also possible that this binary
 or one of the libraries it was linked against is corrupt, improperly built,
 or misconfigured. This error can also be caused by malfunctioning hardware.
 We will try our best to scrape up some info that will hopefully help diagnose
 the problem, but since we have already crashed, something is definitely wrong
 and this may fail.
 
 key_buffer_size=8388600
 read_buffer_size=131072
 max_used_connections=2
 max_connections=100
 threads_connected=3
 It is possible that mysqld could use up to 
 key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225791 K
 bytes of memory
 Hope that's ok; if not, decrease some variables in the equation.
 
 thd=0x85b00a8
 Attempting backtrace. You can use the following information to find out
 where mysqld died. If you see no messages after this, something went
 terribly wrong...
 Cannot determine thread, fp=0x41da4ee4, backtrace may not be correct.
 Stack range sanity check OK, backtrace follows:
 0x813c7c4
 0x4004e618
 0x40049dea
 0x4202726c
 0x40049dea
 0x8185301
 0x400492b6
 0x420de407
 New value of fp=(nil) failed sanity check, terminating stack trace!
 Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow 
 instructions on how to resolve the stack trace. Resolved
 stack trace is much more helpful in diagnosing the problem, so please do resolve it

Could you please post a resolved stack trace as suggests the url above ?

 Trying to get some variables.
 Some pointers may be invalid and cause the dump to abort...
 thd-query at 0x8584920 = O.H..B.
 thd-thread_id=4
 The manual page at http://www.mysql.com/doc/en/Crashing.html contains
 information that should help you find out what is causing the crash.
 040223 15:01:37  mysqld ended

Thank you!
 
Regards,
Sergei

-- 
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/  www.mysql.com

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



Encrypt data

2004-02-24 Thread Mike Koponick
Hello everyone,

I'm new to the list and did a little searching on the archives but
wanted to ask my question to the group.

I have a requirement to encrypt all data stored into a database. I was
wondering if there was a different way of doing this or should I use the
encrypt/decrypt functions?

The idea is that if someone stole the hard drive or computer, it would
be hard for someone to break into the database. It seems to me the best
way would be to encrypt the drive space, and use the login to
authenticate the encryption space on the hard drive. 

Is something like this doable?


I'm running a server with RedHat 9.0/MySQL version 4.0.16.

Thanks in advance,

Mike



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



Error 1064 in Access95

2004-02-24 Thread Hill, Keith
I am converting an Access95 DB to mySQL. The interface will remain in Access95.  I 
encountered a problem with one of the existing queries.  The code for the query is:

SELECT DISTINCTROW ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber, 
ManualChecksPrinted.AccountID, ManualChecksPrinted.PayeeID, 
ManualChecksPrinted.CheckPayee, ManualChecksPrinted.CheckDate, 
ManualChecksPrinted.CheckAmount
FROM ManualChecksPrinted
WHERE (((ManualChecksPrinted.AccountNum) In (SELECT [AccountNum] FROM 
[ManualChecksPrinted] As Tmp GROUP BY [AccountNum],[CheckNumber] HAVING Count(*)1  
And [CheckNumber] = [ManualChecksPrinted].[CheckNumber])))
ORDER BY ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber;

The problem is in the WHERE clause.  I get the ODBC--call failed message box, and the 
following:

[MySQL][ODBC 3.51 Driver][mysqld-4.0.17-nt]You have an error in your SQL syntax. Check 
the manual that corresponds to your MySQL server version for the right syntax to use 
near '(SELECT `MS2`.`AccountNum` FROM `manualchecksprinted` `MS2` GR (#1064)

I am a newbie to MySQL so all help is greatly appreciated.  If more information is 
required, please let me know.

Keith Hill 
[EMAIL PROTECTED] 


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



Fresh/New install of MySql 4.1

2004-02-24 Thread Dale Goolcharan
Hi,
  I am currently running mysql4.0 and I will like to upgrade to 4.1 to 
support unicode for languages such as korean, Japanese, Spanish and so on.
  I do not want to upgrade but simply perform a fresh install and create 
new databases to support unicode. When I perform this upgrade, the MYSQL 
service never starts. Red light always shows. I cannot see the default 
databases : mysql and test.
  How can I fix this. Should I try an upgrade from 4.0 to 4.1 and what are 
the steps to do this?
I downloaded the mysql-4.1.1a-alpha-win zip file from mysql.com.

Thank you.
Dale Goolcharan.
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=dept/bcommpgmarket=en-caRU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca

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


How to install data on a RAID HDD??

2004-02-24 Thread Kirti S. Bajwa
Hello List:

First my apology: I have previously asked this question and saved the
response. But we lost our Win NT server and all the saved data, so I ask the
same question again. I have looked in archives for the last three months and
have not been able to find my previous Q/A. I will be setting up MySQL
server, as soon as I know how.

I plan to install MySQL on a RH 9 Server named data. This server has one
main disk (which is a boot disk with all the O/S ) and two RAID-1 HDD
mirroring one another. My plan is to install MySQL on the main HDD but
install/create all the SQL data, tables, Indexes, etc., on the RAID HDD.
RAID HDD will have only SQL data.

I have no problem installing MySQL on the main HDD but can not figure out
what changes are needed so all the data goes to RAID disks. I am a newbie so
please, give direction!!

Kirti


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



Re: Help with a query

2004-02-24 Thread Michael Stassen
Mail messages start with From.  When you begin a line with From in 
the body of your message, your mailer, like most, prepends a  to 
prevent it from being interpreted as the start of another message.  You 
can usually avoid this yourself by prepending a space.

Michael

[EMAIL PROTECTED] wrote:
I think you may have introduced the From typo, but it is one regardless. I
don't think the parens are necessary. Try it out.
Ted Gifford

-Original Message-
From: Gregory A. Swarthout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 24, 2004 9:44 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Help with a query

Quoting [EMAIL PROTECTED]:

Sounds like you want to do:

Select store_name, t1mgr.manager_name as 'type_1_manager',
t2mgr.manager_name as 'type_2_manager'
From (keystone_stores ks left join managers t1mgr on ks.id =
t1mgr.store_id
and t1mgr.manager_type = 1) 
Left join managers t2mgr on ks.id = t2mgr.store_id 
and t2mgr.manager_type = 2

Does that fit the bill?


I think so.  Are the parantheses necessary?  Is the From just a typo?

Greg



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


Re: Encrypt data

2004-02-24 Thread Frederic Wenzel
Mike Koponick wrote:
The idea is that if someone stole the hard drive or computer, it would
be hard for someone to break into the database. It seems to me the best
way would be to encrypt the drive space, and use the login to
authenticate the encryption space on the hard drive. 
How about sth like that:

http://freshmeat.net/projects/cryptofs/

Nothing mysql-specific though, and I know nothing about its speed or 
usability in general. But maybe you want to give it a try.

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


Re: Help with a query

2004-02-24 Thread Hassan Schroeder
[EMAIL PROTECTED] wrote:

I think you may have introduced the From typo
historitrivia

! Try looking at a mailbox in a text editor -- you'll notice that
the string 'From ' occuring at the beginning of a line is used as
the message separator.
Thus when that string occurs within a message body, it needs to be
escaped, historically (*) by prefixing it with ''.
* might be specified by the RFC, don't recall at the moment...

/historitrivia
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



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


Re: Fresh/New install of MySql 4.1

2004-02-24 Thread vpendleton
What is being logged to the *.err log in the data directory?

 Original Message 

On 2/24/04, 12:42:19 PM, Dale Goolcharan [EMAIL PROTECTED] wrote 
regarding Fresh/New install of MySql 4.1 :


 Hi,
I am currently running mysql4.0 and I will like to upgrade to 4.1 to
 support unicode for languages such as korean, Japanese, Spanish and so 
on.
I do not want to upgrade but simply perform a fresh install and create
 new databases to support unicode. When I perform this upgrade, the MYSQL
 service never starts. Red light always shows. I cannot see the default
 databases : mysql and test.
How can I fix this. Should I try an upgrade from 4.0 to 4.1 and what 
are
 the steps to do this?
 I downloaded the mysql-4.1.1a-alpha-win zip file from mysql.com.


 Thank you.
 Dale Goolcharan.

 _
 Help STOP SPAM with the new MSN 8 and get 2 months FREE*
 
http://join.msn.com/?page=dept/bcommpgmarket=en-caRU=http%3a%2f%2fjoin.m
sn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca


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

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



Re: Updating a Record

2004-02-24 Thread vpendleton
MySQL is designed to do that. If no data is changed, then MySQL will not 
perform the update.

 Original Message 

On 2/24/04, 11:36:39 AM, Jacque Scott [EMAIL PROTECTED] wrote 
regarding Updating a Record:


 I am converting from Access 2.0 to MySQL and I am going through all of
 my code to make it compatible with MySQL.  I was testing my Update for
 one of my queries and I don't know if I found a bug or if MySQL was
 designed to do this.

 In my program I pass an UPDATE string to MySQL.  There can be times
 when there really isn't anything to UPDATE but the string is passed
 anyway.  In Access it would run the query and just overwrite everything.
  In MySQL it does nothing if there are no changes.
 Here is a sample UPDATE:

 UPDATE tblQuotes SET CompanyContact= George Bush, CompanyName= Hello
 There
 WHERE (QuoteNumber= 55 AND Revision= Initial

 If the data in the DB is the same then nothing happens.  If I make a
 change to either of the fields then it updates.  Was MySQL designed this
 way?

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



Re: How to install data on a RAID HDD??

2004-02-24 Thread vpendleton
Configure your my.cnf data_dir parameter to point to the raid Hard Drive.

 Original Message 

On 2/24/04, 12:44:13 PM, Kirti S. Bajwa [EMAIL PROTECTED] wrote regarding 
How to install data on a RAID HDD??:


 Hello List:

 First my apology: I have previously asked this question and saved the
 response. But we lost our Win NT server and all the saved data, so I ask 
the
 same question again. I have looked in archives for the last three months 
and
 have not been able to find my previous Q/A. I will be setting up MySQL
 server, as soon as I know how.

 I plan to install MySQL on a RH 9 Server named data. This server has 
one
 main disk (which is a boot disk with all the O/S ) and two RAID-1 HDD
 mirroring one another. My plan is to install MySQL on the main HDD but
 install/create all the SQL data, tables, Indexes, etc., on the RAID HDD.
 RAID HDD will have only SQL data.

 I have no problem installing MySQL on the main HDD but can not figure out
 what changes are needed so all the data goes to RAID disks. I am a newbie 
so
 please, give direction!!

 Kirti


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

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



Re: How to install data on a RAID HDD??

2004-02-24 Thread beacker
I have no problem installing MySQL on the main HDD but can not figure out
what changes are needed so all the data goes to RAID disks. I am a newbie so
please, give direction!!

 The easiest way to do this would be to move the data directory and
all its contents onto the RAID disks.  Then symlink to that directory from
the original location. Example only from basic source install:

mv /usr/local/mysql/var /hdRAID/var
ln -s /hdRAID/var /usr/local/mysql/var

Please make sure that mysql is shutdown before doing this task.
 Brad Eacker ([EMAIL PROTECTED])



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



replication updates

2004-02-24 Thread Chris Hellberg
Hi,

Is there a useful list of updates that have gone in to Mysql since late 3.0 releases? 
I'm always having to manually coax replication between a couple of servers and was 
wondering if replication has become more resilient in later releases.

I've reloaded the database on the slaves and once that's been done, replication starts 
working again, but after a few days I find some queries aren't updating any more and I 
have to keep going back and manually intervening, but that's another story :)

Cheers,

Chris

--
This communication, including any attachments, is confidential. 
If you are not the intended recipient, you should not read
it - please contact me immediately, destroy it, and do not
copy or use any part of this communication or disclose
anything about it. Thank you. Please note that this 
communication does not designate an information system for
 the purposes of the Electronic Transactions Act 2002.
--


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



MAX_ROWS

2004-02-24 Thread Tucker, Gabriel
Hello

OS: Unix   MySQL:4.0.16
OS: Linux  MySQL:4.0.17

I am trying to limit the size of the MyISAM tables in a MySQL database.  As far as I 
can tell, my only option is using the MAX_ROWS parameter on a table.  I am not looking 
to do this limit at the OS level.

I wanted to test how the max_rows parameter works.  I set it to 3 on a table.  And, I 
was able to add 33 records [I stopped at this point].  It never prevented me from 
adding more records.  The result is NOT what I expected.  I expected that upon 
attempting to add the 4th record, I would have received some sort of error message.

Am I mis-using this parameter?  

TIA
Gabe

*

The jokes on him, I'll be dead by then - HJS

Gabe Tucker
Bloomberg LP
P 609 750 6668
F 646 268 5681

*


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



Server AutoStart on Mac OS X 10.3.2 Panther

2004-02-24 Thread Tristan Fiedler
Hi All,

Thank you very much for the kind and ample help !

I am running Mac OS X 10.3.2 Panther, and per the MySQL (DuBois) book have
created a new user 'mysqladm' to run the server.

I manually start the server now via :

sudo mysqld_safe --user=mysqladm

I have two questions :

1. Why does 'mysqld' appear as a process under both (Is this OK/secure?):

top -U root   (although here, it does not seem to be consuming any time)

top -U mysqladm

2.  Since I have created this new account solely for running the server,
how do I enable automatic starting of the server when I reboot?  I read
that Mac OSX has /Library/StartupItems /System/Library/StartupItems  also
a nice packaged 'Installer' but I am worried that my --user=mysqladm will
not be configured properly with this installer.

Thank you all for any help!

Cheers,

Tristan

-- 
Tristan J. Fiedler, Ph.D.
Postdoctoral Research Fellow - Walsh Laboratory
NIEHS Marine  Freshwater Biomedical Sciences Center
Rosenstiel School of Marine  Atmospheric Sciences
University of Miami

[EMAIL PROTECTED]
[EMAIL PROTECTED] (alias)
305-361-4626

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



same table description behaves differently on different machine?

2004-02-24 Thread Bing Du
Greetings,

I used the 'scp' command to copy the file.MYD, file.MYI and file.frm files
from one linux box to another linux box.

On the source linux box, the table is like this:

mysql desc file;
+--+---+--+-+-+---+
| Field| Type  | Null | Key | Default | Extra |
+--+---+--+-+-+---+
| file_id  | varchar(32)   |  | PRI | |   |
| title| varchar(64)   |  | | |   |
| user_file_name   | varchar(64)   |  | | |   |
| system_file_name | varchar(128)  |  | | |   |
| path | varchar(255)  |  | | |   |
| data | longblob  | YES  | | NULL|   |
| size | int(11)   |  | | 0   |   |
| filetype | varchar(32)   |  | | |   |
| modified | timestamp(14) | YES  | | NULL|   |
+--+---+--+-+-+---+
9 rows in set (0.00 sec)

But on the destination linux box, it's like:

mysql desc file;
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-+---+
| file_id  | varchar(32)  |  | PRI | |   |
| title| varchar(64)  |  | | |   |
| user_file_name   | varchar(64)  |  | | |   |
| system_file_name | varchar(128) |  | | |   |
| path | varchar(255) |  | | |   |
| data | longblob | YES  | | NULL|   |
| size | int(11)  |  | | 0   |   |
| filetype | varchar(32)  |  | | |   |
| modified | timestamp| YES  | | NULL|   |
+--+--+--+-+-+---+
9 rows in set (0.00 sec)

Now the time shows as '20030729081900' on the source machine.  But the
time reads like '2003-07-29 08:19:00' on the destination machine.

Can anybody tell me why the 'modified' field changed from type
'timestamp(14)' to type 'timestamp'?  I need to keep the type
timestamp(14).

Thanks in advance,

Bing

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



Did I mess up MySQL?

2004-02-24 Thread Database Administrator
I had MySQL 3.23.52-3 installed on RH Linux 8.0 (default
that comes with it). I decied to install 4.0 and used
this command to install it:

rpm -Uvh --nodeps MySQL-server-4.0.18-0.i386.rpm

I didn't see any obvious errors thereafter. After rebooting
noticed that looks like the mysql daemon is running:

$ ps -ef|grep mysql
root  1620 1  0 15:52 pts/000:00:00 /bin/sh 
/usr/bin/mysqld_safe --d
mysql 1655  1620  0 15:52 pts/000:00:00 /usr/sbin/mysqld 
--basedir=/ --d

However the file /usr/bin/mysql no longer exists so 
how do I actually get a command line interface to
MySQL? Or is there something else I need to install that
I have neglected? Or am I just hosed? :)

Thanks,

lk
www.theNewAgeSite.com



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



Re: same table description behaves differently on different machine?

2004-02-24 Thread Paul DuBois
At 15:46 -0600 2/24/04, Bing Du wrote:
Greetings,

I used the 'scp' command to copy the file.MYD, file.MYI and file.frm files
from one linux box to another linux box.
On the source linux box, the table is like this:

mysql desc file;
+--+---+--+-+-+---+
| Field| Type  | Null | Key | Default | Extra |
+--+---+--+-+-+---+
| file_id  | varchar(32)   |  | PRI | |   |
| title| varchar(64)   |  | | |   |
| user_file_name   | varchar(64)   |  | | |   |
| system_file_name | varchar(128)  |  | | |   |
| path | varchar(255)  |  | | |   |
| data | longblob  | YES  | | NULL|   |
| size | int(11)   |  | | 0   |   |
| filetype | varchar(32)   |  | | |   |
| modified | timestamp(14) | YES  | | NULL|   |
+--+---+--+-+-+---+
9 rows in set (0.00 sec)
But on the destination linux box, it's like:

mysql desc file;
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-+---+
| file_id  | varchar(32)  |  | PRI | |   |
| title| varchar(64)  |  | | |   |
| user_file_name   | varchar(64)  |  | | |   |
| system_file_name | varchar(128) |  | | |   |
| path | varchar(255) |  | | |   |
| data | longblob | YES  | | NULL|   |
| size | int(11)  |  | | 0   |   |
| filetype | varchar(32)  |  | | |   |
| modified | timestamp| YES  | | NULL|   |
+--+--+--+-+-+---+
9 rows in set (0.00 sec)
Now the time shows as '20030729081900' on the source machine.  But the
time reads like '2003-07-29 08:19:00' on the destination machine.
Can anybody tell me why the 'modified' field changed from type
'timestamp(14)' to type 'timestamp'?  I need to keep the type
timestamp(14).
Thanks in advance,
My guess would be that the source server is running a version of MySQL
earlier than 4.1, and the destination server is running MySQL 4.1.x.
The TIMESTAMP display format changed in 4.1, and display widths no longer
are supported.  (In effect, all timestamps are TIMESTAMP(14).)
See:

http://www.mysql.com/doc/en/Upgrading-from-4.0.html

Note particularly the SQL Changes section.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MAX_ROWS

2004-02-24 Thread Alison W
 I wanted to test how the max_rows parameter works.  I set it to 3 on a
 table.  And, I was able to add 33 records [I stopped at this point].  It
 never prevented me from adding more records.  The result is NOT what I
 expected.  I expected that upon attempting to add the 4th record, I would
 have received some sort of error message.

 Am I mis-using this parameter?

Yes: MAX_ROWS is a *guidance* to the system in setting up the table and
not a *limit* in any way.

Alison

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



Re: Server AutoStart on Mac OS X 10.3.2 Panther

2004-02-24 Thread Paul DuBois
At 16:26 -0500 2/24/04, Tristan Fiedler wrote:
Hi All,

Thank you very much for the kind and ample help !

I am running Mac OS X 10.3.2 Panther, and per the MySQL (DuBois) book have
created a new user 'mysqladm' to run the server.
I manually start the server now via :

sudo mysqld_safe --user=mysqladm

I have two questions :

1. Why does 'mysqld' appear as a process under both (Is this OK/secure?):

top -U root   (although here, it does not seem to be consuming any time)

top -U mysqladm

2.  Since I have created this new account solely for running the server,
how do I enable automatic starting of the server when I reboot?  I read
that Mac OSX has /Library/StartupItems /System/Library/StartupItems  also
a nice packaged 'Installer' but I am worried that my --user=mysqladm will
not be configured properly with this installer.
Grab that Startup Item package from www.mysql.com and install it.
Then look under /System/Library/StartupItems/MySQL.  In that directory,
you'll find a file named MySQL.  Find the lines where it looks for the
server and change them to have values appropriate for your system.
For example, the edited version might look like this:

cd /usr/local/mysql

# We have to find out if we're starting a 3.x or a 4.x
# MySQL database server
#
if [ -e ./bin/safe_mysqld ]
then
   
# This is version 3.x
#
#./bin/safe_mysqld --user=mysql 
./bin/safe_mysqld --user=mysqladm 
   
elif [ -e ./bin/mysqld_safe ]
then
   
# This is version 4.x
#
#./bin/mysqld_safe --user=mysql 
./bin/mysqld_safe --user=mysqladm 

You'll probably want to change the cd command, too, if your installation
is located somewhere other than /usr/local/mysql.
Or else make /usr/local/mysql a symlink to your actual installation
directory.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Did I mess up MySQL?

2004-02-24 Thread Paul DuBois
At 15:37 -0600 2/24/04, Database Administrator wrote:
I had MySQL 3.23.52-3 installed on RH Linux 8.0 (default
that comes with it). I decied to install 4.0 and used
this command to install it:
rpm -Uvh --nodeps MySQL-server-4.0.18-0.i386.rpm

I didn't see any obvious errors thereafter. After rebooting
noticed that looks like the mysql daemon is running:
$ ps -ef|grep mysql
root  1620 1  0 15:52 pts/000:00:00 /bin/sh
/usr/bin/mysqld_safe --d
mysql 1655  1620  0 15:52 pts/000:00:00 /usr/sbin/mysqld
--basedir=/ --d
However the file /usr/bin/mysql no longer exists so
how do I actually get a command line interface to
MySQL? Or is there something else I need to install that
I have neglected? Or am I just hosed? :)
There are different RPMs containing different parts of the installation.
You just need to install the client RPM and you should be fine.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Error 1064 in Access95

2004-02-24 Thread Daniel Kasak




Hill, Keith wrote:

  I am converting an Access95 DB to mySQL. The interface will remain in Access95.  I encountered a problem with one of the existing queries.  The code for the query is:

SELECT DISTINCTROW ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber, ManualChecksPrinted.AccountID, ManualChecksPrinted.PayeeID, ManualChecksPrinted.CheckPayee, ManualChecksPrinted.CheckDate, ManualChecksPrinted.CheckAmount
FROM ManualChecksPrinted
WHERE (((ManualChecksPrinted.AccountNum) In (SELECT [AccountNum] FROM [ManualChecksPrinted] As Tmp GROUP BY [AccountNum],[CheckNumber] HAVING Count(*)1  And [CheckNumber] = [ManualChecksPrinted].[CheckNumber])))
ORDER BY ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber;

The problem is in the WHERE clause.  I get the ODBC--call failed message box, and the following:

[MySQL][ODBC 3.51 Driver][mysqld-4.0.17-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(SELECT `MS2`.`AccountNum` FROM `manualchecksprinted` `MS2` GR (#1064)

I am a newbie to MySQL so all help is greatly appreciated.  If more information is required, please let me know.

Keith Hill 
[EMAIL PROTECTED] 
  

You're using a subquery, which Access is passing through to MySQL.
MySQL-4.0.17 doesn't support subqueries - only version 4.1.x and higher
do.
Make another query, put the stuff in the subquery in it - that's the
bit that says:

in ( select  )

Save it, and then join it to your original query.

Dan

-- 

signature
Daniel Kasak

IT Developer

NUS Consulting Group

Level 5, 77 Pacific Highway

North Sydney, NSW, Australia 2060

T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989

email: [EMAIL PROTECTED]

website: http://www.nusconsulting.com.au



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

Re: MAX_ROWS

2004-02-24 Thread Keith C. Ivey
On 24 Feb 2004 at 22:01, Alison W wrote:

 Yes: MAX_ROWS is a *guidance* to the system in setting up the table
 and not a *limit* in any way.

Well, it is a limit in one way.  MySQL uses it (in MyISAM tables) to 
calculate the size of the pointer used for positions within the data 
file.  If the data file becomes larger than can be handled by that 
size of pointer, then you can't add any more records to the table 
(unless you increase MAX_ROWS or AVG_ROW_LENGTH so that the pointer 
size is increased).

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org


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



Re: same table description behaves differently on differentmachine?

2004-02-24 Thread Bing Du
Paul, your guess was absolutely correct.  Looking at the information
pointed to by the URL you sent, seems it's pretty easy to switch to the
old format.  That's good.  Thanks for the heads-up!

Bing

 At 15:46 -0600 2/24/04, Bing Du wrote:
Greetings,

I used the 'scp' command to copy the file.MYD, file.MYI and file.frm
 files
from one linux box to another linux box.

On the source linux box, the table is like this:

mysql desc file;
+--+---+--+-+-+---+
| Field| Type  | Null | Key | Default | Extra |
+--+---+--+-+-+---+
| file_id  | varchar(32)   |  | PRI | |   |
| title| varchar(64)   |  | | |   |
| user_file_name   | varchar(64)   |  | | |   |
| system_file_name | varchar(128)  |  | | |   |
| path | varchar(255)  |  | | |   |
| data | longblob  | YES  | | NULL|   |
| size | int(11)   |  | | 0   |   |
| filetype | varchar(32)   |  | | |   |
| modified | timestamp(14) | YES  | | NULL|   |
+--+---+--+-+-+---+
9 rows in set (0.00 sec)

But on the destination linux box, it's like:

mysql desc file;
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-+---+
| file_id  | varchar(32)  |  | PRI | |   |
| title| varchar(64)  |  | | |   |
| user_file_name   | varchar(64)  |  | | |   |
| system_file_name | varchar(128) |  | | |   |
| path | varchar(255) |  | | |   |
| data | longblob | YES  | | NULL|   |
| size | int(11)  |  | | 0   |   |
| filetype | varchar(32)  |  | | |   |
| modified | timestamp| YES  | | NULL|   |
+--+--+--+-+-+---+
9 rows in set (0.00 sec)

Now the time shows as '20030729081900' on the source machine.  But the
time reads like '2003-07-29 08:19:00' on the destination machine.

Can anybody tell me why the 'modified' field changed from type
'timestamp(14)' to type 'timestamp'?  I need to keep the type
timestamp(14).

Thanks in advance,

 My guess would be that the source server is running a version of MySQL
 earlier than 4.1, and the destination server is running MySQL 4.1.x.

 The TIMESTAMP display format changed in 4.1, and display widths no longer
 are supported.  (In effect, all timestamps are TIMESTAMP(14).)

 See:

 http://www.mysql.com/doc/en/Upgrading-from-4.0.html

 Note particularly the SQL Changes section.

 --
 Paul DuBois, MySQL Documentation Team
 Madison, Wisconsin, USA
 MySQL AB, www.mysql.com

 MySQL Users Conference: April 14-16, 2004
 http://www.mysql.com/uc2004/



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



RE: How to install data on a RAID HDD??

2004-02-24 Thread Kirti S. Bajwa
Worked like a charm.

Thanks. You are a life saver.

Kirti

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 2:21 PM
To: Kirti S. Bajwa
Cc: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: Re: How to install data on a RAID HDD?? 


I have no problem installing MySQL on the main HDD but can not figure out
what changes are needed so all the data goes to RAID disks. I am a newbie
so
please, give direction!!

 The easiest way to do this would be to move the data directory and
all its contents onto the RAID disks.  Then symlink to that directory from
the original location. Example only from basic source install:

mv /usr/local/mysql/var /hdRAID/var
ln -s /hdRAID/var /usr/local/mysql/var

Please make sure that mysql is shutdown before doing this task.
 
Brad Eacker ([EMAIL PROTECTED])


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



Moving server

2004-02-24 Thread Jim Richardson
I am beginning the process of moving an exising MySQL/Apache server, (or
rather, several of the sites there) to a new machine, to spread the
load, and allow us to upgrade the servers bit by bit.
Versions of MySQL are both 3.23.58

Apache and PHP, etc, is set up and humming along nicely, doing mostly
nothing yet on the new server, but doing it very well. 

My plan is as follows. 

Set up the old server (which I will call Alpha) to binlog it's
transactions, and act as a master. 

Set up the new server (now called Beta, so original) to replicate from
Alpha. 

Dump the DB from Alpha, insert it into Beta, (with Alpha set to not
process transactions for this time) then restart Beta, to start
replicating. Restart Alpha to run normally. 

Verify that replication, is occuring, and that all transactions are
working well. 

(is there an easy way to check consistancy between master and slave?
RTFM is fine, if you can please point me to the FM in question :)
Then after I am sure that all is well, I will play jiggery pokery games
with BIND and hopefully, all will be well, after a few hours for the
changes to replicate. 

Is there something on the MySQL end I am missing? forgetting? not taking
into account? 

The firewall rules will block all connections to 3306 that don't come
from either Alpha or Beta, the data isn't sensitive in any way, so I am
not worried about sniffing, and I will shut the replication connection
down after all is working on Beta. 

Thanks all. 

--
Jim Richardson http://www.eskimo.com/~warlock
All life is a conjugation of the verb to eat
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


inserting huge string

2004-02-24 Thread lga2
hi,
I am using mysql 4.0.14. I have a table where one of the fields has a 
datatype longblob. What I am trying to do is to enter a genome sequence which 
has around 175 characters. the file size is about 1.5MB which is well 
within the longblob size. I am using python to enter the sequence from a file 
to the database and the while i am running the python program ,the connection 
to the db is lost. So it takes in only around 103500 characters.

I tried changing the variables in mysql,the max_allowed_packet  using the 
following command:

set max_allowed_packet=4;

I tried changing it to max 4G which is the maximum size for longblob. But it 
changed to a maximum of 1G. 

Even is it is 1G, the size of the file i am trying to enter is well within the 
size of the datatype.

I am not sure how to enter this huge string. What should I do??

thanks,
liz



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



Re: Did I mess up MySQL?

2004-02-24 Thread Bernard Clement

You also need to install the rpm for mysql-client.

Bernard

On Tuesday 24 February 2004 16:37, Database Administrator wrote:
 I had MySQL 3.23.52-3 installed on RH Linux 8.0 (default
 that comes with it). I decied to install 4.0 and used
 this command to install it:

 rpm -Uvh --nodeps MySQL-server-4.0.18-0.i386.rpm

 I didn't see any obvious errors thereafter. After rebooting
 noticed that looks like the mysql daemon is running:

 $ ps -ef|grep mysql
 root  1620 1  0 15:52 pts/000:00:00 /bin/sh
 /usr/bin/mysqld_safe --d
 mysql 1655  1620  0 15:52 pts/000:00:00 /usr/sbin/mysqld
 --basedir=/ --d

 However the file /usr/bin/mysql no longer exists so
 how do I actually get a command line interface to
 MySQL? Or is there something else I need to install that
 I have neglected? Or am I just hosed? :)

 Thanks,

 lk
 www.theNewAgeSite.com


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



  1   2   >