MySQL Test Framework documented

2006-06-28 Thread Stefan Hinz
MySQL is shipped with a set of test cases and programs for running them. These tools constitute the MySQL test framework that provides a means for verifying that MySQL Server and its client programs operate according to expectations. That's handy for anybody developing MySQL or contributing code

How to share data between servers

2006-06-28 Thread VenuGopal Papasani
Hi all, I have got two servers.Let it be server1 and server2 now i have an application one on server1 which gets the data everymonth and stores in the database and now the problem is the application in server2 also need the data to be accessed but data is entered only once in server1

Re: How to share data between servers

2006-06-28 Thread Gabriel PREDA
1. One-Way-Replication: server2 gets data from server1, if server2 does not write in the database... if it writes: 1.a 2-Way-Replication: server2 gets data from server1 AND server1 gets data from server2... :) ... 2. FEDERATED Storage Engine: the actual data is stored on server1, the tables

Re: Please Help - Stored Procedure Issue

2006-06-28 Thread Jesse
Aaah. OK. That's what the @ stands for. I could not figure out what the @ was for, and I posted a message on the list yesterday and did not receive a response. You're right. That solved the problem. Thanks, Jesse - Original Message - From: Chris White [EMAIL PROTECTED] To:

Converting string hex column to integer

2006-06-28 Thread Dušan Pavlica
Hello, I have column of type char(2) containing hex numbers (e.g. 0A, FF, ...) and I cannot find correct function which could convert those hex numbers to integers so I can perform futher calculations. I experimented with HEX(), CAST(), CONVERT() but I wasn't succesfull. Thanks in advance,

Re: Query Speed

2006-06-28 Thread Jesse
I've never seen a query like this, and didn't know it was possible to do a lot of the things that you're doing. That's great. I believe I understand most of it. However, I got an error that doesn't seem to make any sense to me when I tried to execute the query. The error was, Unknown column

How to create references and insert into values in phpmyadmin?

2006-06-28 Thread Andreas Bauer
Hello NG, how can I implement a reference in phpmyadmin between two fields from two different tables, so that the two fields of the two different tables have the same values? And if I have to fill this two tables by building and executing the insert into command, which default value of the

How can I enable big-table option ?

2006-06-28 Thread Halid Faith
Hello I use mysql 4.1. I have a big table which has larger than 4 Gbyte. Therefore I get an error table is full. How can I enable big-table ? Thanks

Re: Query Speed

2006-06-28 Thread Jay Pipes
Jesse wrote: The error was, Unknown column 'primary_grouping.State' in 'on clause'. I assume this is in the ON clause that's JOINing the member_counts to the primary_grouping. No, that's because of a stupid mistake on my part. Here you go: SELECT primary_grouping.State ,

Re: Converting string hex column to integer

2006-06-28 Thread Wolfram Kraus
On 28.06.2006 13:54, Dušan Pavlica wrote: Hello, I have column of type char(2) containing hex numbers (e.g. 0A, FF, ...) and I cannot find correct function which could convert those hex numbers to integers so I can perform futher calculations. I experimented with HEX(), CAST(), CONVERT() but

Re: Converting string hex column to integer

2006-06-28 Thread Dušan Pavlica
Wolfram Kraus napsal(a): On 28.06.2006 13:54, Dušan Pavlica wrote: Hello, I have column of type char(2) containing hex numbers (e.g. 0A, FF, ...) and I cannot find correct function which could convert those hex numbers to integers so I can perform futher calculations. I experimented with

RE: concurrency problem

2006-06-28 Thread Burke, Dan
I have been using this set of functions to do sequences, especially for tables where AUTO_INCREMENT can be inconvenient. Maybe it will help you over just incrementing the ID by 1 in your code. I based them on the DBIx::MysqlSequence perl module

Re: concurrency problem

2006-06-28 Thread Brent Baisley
On the extremely rare occasion when I couldn't use an auto increment, mainly for performance reasons, I've used an id+subid. Usually I've only done this for long running scripts that process/add a lot of records. In this case I want to the script to generate it's own id's. To keep them unique,

Secure login / set maximum of login tries

2006-06-28 Thread Michael Decker
Hi, is there a way to set a maximum of login tries? Thanks, Michael Decker -- Michael Decker [EMAIL PROTECTED] TESIS SYSware GmbH http://www.tesis.de Baierbrunnerstr. 15 * 81379 Muenchen * Tel. +49 89 747377-0 -- MySQL General Mailing

Re: How can I enable big-table option ?

2006-06-28 Thread Brent Baisley
It may not be the big-table option you are looking for. MySQL defaults to a 4GB table limit based on calculation. From CREATE TABLE in the manual, under AVG_ROW_LENGTH. MySQL uses the product of the MAX_ROWS and AVG_ROW_LENGTH options to decide how big the resulting table is. If you do not

is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Martin Jespersen
Hey all i am running mysql 4.1.20. I have a table with about 2.5 million records and i have to do queries on it that looks something like: select * from table where field1 like '%some%thing%' order by field2 This is ofcourse very slow since it refuses to use indexes... i have fairly large

mysql_connect problem

2006-06-28 Thread WSteffen
I am using the following in a PHP script: bash-3.00$ cat mail ?php $connect = mysql_connect(localhost, bp5am, bp5ampass) or ? Which gives the following MySQl error: Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider

Insertion Problem

2006-06-28 Thread Nicholas Vettese
Hello all, I am trying to get this script to INSERT a couple of records into my DB, but I am getting these errors. I know the second warning has nothing to do with MySQL, so I will work on figuring out that portion later today. Warning: mysql_fetch_array(): supplied argument is not a valid

Sorry for the dumb question how do I fix table is full?

2006-06-28 Thread Jacob, Raymond A Jr
Environment: Freebsd 6.0 Mysql : mysql Ver 14.7 Distrib 4.1.18, for porbld-freebsd6.0 (i386) using 5.0 On the client, I get /var/log/messages, I get the errors: kernel: 9643D22706C and database: mysql_error: The table 'data' is full SQL=INSERT INTO data (sid,cid,data_payload) VALUES I

Re: mysql_connect problem

2006-06-28 Thread Jo�o C�ndido de Souza Neto
Which version is your php and your mysql? WSteffen [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] I am using the following in a PHP script: bash-3.00$ cat mail ?php $connect = mysql_connect(localhost, bp5am, bp5ampass) or ? Which gives the following MySQl error: Warning:

RE: mysql_connect problem

2006-06-28 Thread Ing. Edwin Cruz
http://dev.mysql.com/doc/refman/5.0/en/old-client.html Regards! Edwin. -Mensaje original- De: WSteffen [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 28 de Junio de 2006 10:29 a.m. Para: mysql@lists.mysql.com Asunto: mysql_connect problem I am using the following in a PHP script:

Re: Sorry for the dumb question how do I fix table is full?

2006-06-28 Thread Dan Buettner
Raymond, can you post the output of SHOW TABLE STATUS LIKE 'data'; that should show how big your table is and how big it can be... Dan On 6/28/06, Jacob, Raymond A Jr [EMAIL PROTECTED] wrote: Environment: Freebsd 6.0 Mysql : mysql Ver 14.7 Distrib 4.1.18, for porbld-freebsd6.0 (i386) using

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Dan Buettner
Martin, currently there is not a way to optimize that particular type of query. You might consider changing to fulltext indexes and searches instead, as it could be faster, but it is a slightly different animal from LIKE so may not fit your needs.

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Peter Van Dijck
Also, perhaps this is good enough for your situation: like 'some%thing%' as opposed to like '%some%thing%' in this case, mysql can use an index on that column and filter out everything that doesn't start with some. It's a start at least. Peter On 6/28/06, Dan Buettner [EMAIL PROTECTED] wrote:

MySQL Read_only Mode

2006-06-28 Thread Clyde Lewis
All, Does MySQL have an option where the database can startup in READ-ONLY mode? The idea is to have the server running with users connected, but now allowing any updates to me applied to the database. I've looked through the documentation, but was not able to find such a feature. If

Re: MySQL Read_only Mode

2006-06-28 Thread Jo�o C�ndido de Souza Neto
Why you don´t create a user with just select right and use him? Clyde Lewis [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] All, Does MySQL have an option where the database can startup in READ-ONLY mode? The idea is to have the server running with users connected, but now

Re: MySQL Read_only Mode

2006-06-28 Thread jabbott
Only allow your users select rights. --ja On Wed, 28 Jun 2006, Clyde Lewis wrote: All, Does MySQL have an option where the database can startup in READ-ONLY mode? The idea is to have the server running with users connected, but now allowing any updates to me applied to the database.

RE: Sorry for the dumb question how do I fix table is full?

2006-06-28 Thread Jacob, Raymond A Jr
mysql SHOW TABLE STATUS LIKE 'data'; +--++-++-++- +-+-- +---++-+ -++--

Urgent: Please Confirm Interest in China Business Opportunity

2006-06-28 Thread Steven Forsberg
This is a text part of the message. It is shown for the users of old-style e-mail clients

Re: MySQL Read_only Mode

2006-06-28 Thread Clyde Lewis
The idea is to prevent all users from applying changes to the system. Not just a single user. I'm trying to find something similar to Oracle's Read-only mode option during startup. Thanks, CL At 02:38 PM 6/28/2006, João Cândido de Souza Neto wrote: Why you don´t create a user with just

Re: Sorry for the dumb question how do I fix table is full?

2006-06-28 Thread Brent Baisley
MySQL by default limits tables to 4GB, it looks like you hit that limit. It's fairly easy to change that limit, ideally when you create the table. Before MySQL 5.0.6., the default pointer size was 4bytes, which limits you to 4GB. That's the default size, if you specify a max_rows, that size will

Re: MySQL Read_only Mode

2006-06-28 Thread Eric Braswell
--read_only is probably what you are looking for. http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html -- Eric Braswell Web Manager MySQL AB Cupertino, USA Clyde Lewis wrote: The idea is to prevent all users from applying changes to the system. Not just a single user.

Re: Sorry for the dumb question how do I fix table is full?

2006-06-28 Thread Dan Buettner
Your table has just about max'd out - you're using 4,294,967,280 bytes out of a maximum of 4,294,967,295 bytes (15 bytes free). You need to tell mysql to expand this table, with an alter table command to increase max rows: http://dev.mysql.com/doc/refman/5.0/en/table-size.html Dan On

Tough query to crack

2006-06-28 Thread Orton, Steve
Hello fellow listers, I'm currently trying to reduce our TCO by incorporating this fine DBMS and replacing the MS SQLServer we're using. I'm trying to re-implement the stored procedures written for SQLServer to MySQL and have one that's tough to figure out. This stored procedure

Re: Tough query to crack

2006-06-28 Thread Peter Brawley
Steve, INSERT INTO master_context_list (Context_ID, Target_ID) SELECT Context_ID = @ContextID, targets_list.Target_ID FROM targets_list WHERE Target_ID IN ( SELECT Target_ID FROM #APPLICABLE_TARGET_IDS ) [EMAIL PROTECTED] tells the server to return 1 when the column value of

Re: Use of @ in Stored Procedure

2006-06-28 Thread Peter Brawley
Jesse wrote: I have skimmed through several pages of instructions on creating stored procedures, and I can't seem to find when I should and should not use the @ symbol before a variable name? I have seen a lot of procedures where it's always used, and I've written a procedure or two that

Re: Sorry for the dumb question how do I fix table is full?

2006-06-28 Thread Dan Buettner
I agree it's not very clear. I think Brent's example is perfect: ALTER TABLE data max_rows=1 (or whatever number you believe is appropriate for your table) Dan On 6/28/06, Jacob, Raymond A Jr [EMAIL PROTECTED] wrote: The documentation does not seem very clear, at least me on how to

RE: (thank you) Sorry for the dumb question how do I fix table is full?

2006-06-28 Thread Jacob, Raymond A Jr
thank you, raymond -Original Message- From: Dan Buettner [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 16:07 To: Jacob, Raymond A Jr; mysql@lists.mysql.com Subject: Re: Sorry for the dumb question how do I fix table is full? I agree it's not very clear. I think Brent's

Relay-bin logs

2006-06-28 Thread Dirk Bremer
I'm using MySQL 4.1 and the master runs on a Windows 2000 server. This master replicates to several slaves. While browsing the data directory on the master, there are a lot of binary log files that are named: MasterName-relay-bin.99 (where MasterName is the server-name and 99 is a

LIMIT Question

2006-06-28 Thread Dirk Bremer
Is there a way to use a LIMIT clause to show the last X amount of rows or a way to emulate this behavior? For example, a table has somewhere between 1000 and 2000 rows, but you just want to see the last 50. These last 50 might be the most recent entries, for example. Can this be done in single

Re: Relay-bin logs

2006-06-28 Thread Dan Buettner
Those do indeed have something to do with replication - they're a record of all data manipulation commands (inserts, updates, deletes, table creates and alters, etc). The slaves basically read the commands from those files in order to replicate what the master has done. You can purge them

Re: LIMIT Question

2006-06-28 Thread Dan Buettner
Depends what you mean by last - you could show the 50 with the latest datestamps by ending your query with something like: ORDER BY datestampcolumn DESC LIMIT 50; or the 50 with the highest ID numbers, same thing: ORDER BY id DESC LIMIT 50; only real problem there is then they're sorted

RE: Relay-bin logs

2006-06-28 Thread Dirk Bremer
Dan, Thanks for your tips, but I still have an issue. Note the following: mysql PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 31 DAY); Query OK, 0 rows affected (0.01 sec) mysql PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 10 DAY); Query OK, 0 rows affected (0.01 sec) These

RE: Tough query to crack

2006-06-28 Thread Orton, Steve
I don't think that will work because Context_ID is not found in 'targets_list' hence the error. That's why I thought the Context_ID field was being assigned with the value of @ContextID. That's the only way we can get this value. What I would like is Context_ID to be filled with the

RE: LIMIT Question

2006-06-28 Thread Dirk Bremer
Dan, That might be close. The rows are inserted with an auto-increment primary key, but I have no ready way of knowing what the latest 50-IDs are. There are also various date columns, but I won't readily know the dates in this scenario. The goal of the query, which currently returns all of the

Re: LIMIT Question

2006-06-28 Thread Chris White
On Wednesday 28 June 2006 01:39 pm, Dirk Bremer wrote: Dan, That might be close. The rows are inserted with an auto-increment primary key, but I have no ready way of knowing what the latest 50-IDs are. There are also various date columns, but I won't readily know the dates in this scenario.

Re: Relay-bin logs

2006-06-28 Thread Dan Buettner
My bad, Dirk, sorry. I missed that you were asking about relay-bin files, thought you were asking about bin files. These relay-bin files are on the master server? This doc: http://dev.mysql.com/doc/refman/5.0/en/slave-logs.html makes it sound like they should only exist on the slave servers.

Re: LIMIT Question

2006-06-28 Thread Dan Buettner
Dirk, you could try this: (SELECT * FROM customertable WHERE some criteria ORDER BY customertableid DESC LIMIT 50) ORDER BY customertableid ASC; Like one sometimes does with UNIONs, but without any UNIONs. Didn't know whether it would work, but it does (on 5.0.21 anyway). That will give you

Re: Tough query to crack

2006-06-28 Thread Peter Brawley
I don't think that will work because Context_ID is not found in 'targets_list' hence the error. That's why I thought the Context_ID field was being assigned with the value of @ContextID. That's the only way we can get this value. Perhaps not, but no matter. What I would like is Context_ID to

RE: Relay-bin logs

2006-06-28 Thread Dirk Bremer
I should add I ran a FLUSH LOGS on the master and this had no effect on the relay-bin files. Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO - USA Central Time Zone 636-755-2652 fax 636-755-2503 [EMAIL PROTECTED] www.nisc.coop -Original Message- From: Dirk

RE: Relay-bin logs

2006-06-28 Thread Dirk Bremer
Dan, Yes they are on the master. The master is not configured as a slave: mysql show slave status; Empty set (0.07 sec) mysql show master status; +--+--+--+--+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |

How to get bookbiz.sql

2006-06-28 Thread Karl Larsen
If you happen to have The Practical SQL Handbook of 1996 it comes with a DB called bookbiz.sql which was current for MySQL of 1996. A lot has changed so the file had to be re-written to work on MySQL version 4.1.x. I did this and you can have my file by going to my web page and d/l it.

RE: Tough query to crack

2006-06-28 Thread Orton, Steve
What if @ContextID is an input variable to the procedure. What can we do then? I'm sorry if this seems very academic, but I'm rather new to the stored procedure thing and only a little better at SQL statements as a whole:) Steven J Orton Software Engineer Northrop Grumman Mission Systems

Getting unique values

2006-06-28 Thread Chris Sansom
I'm sure this is an elementary problem, but I can't get my head round it. I have two tables: pix and sections, the relevant bits of which are: pix (2,421 rows): picid varchar(7) not null sectionid smallint(5) unsigned not null caption text null

MySQL Denormalized

2006-06-28 Thread Jan Gomes
Hy Guys, I needed denormalized my table to obtain high performance, but i want best appropriate the space. I joint two column (of the JOIN) intro one column with two separadores (# and ;) Example: ID | column_1 | column_denormalized 1 | Test | 1#20202;5#1000101; It has some method to

RE: LIMIT Question

2006-06-28 Thread Dirk Bremer
Dan, Close, but there appears to be some differences under 4.1 which are interesting to say the least. Using: SELECT * FROM customertable WHERE some criteria ORDER BY customertableid DESC LIMIT 50 I get the expected result, i.e. 50 ordered in reverse. Using: (SELECT * FROM customertable WHERE

Distinct problem

2006-06-28 Thread Tanner Postert
The situation is somewhat hard to describe, so please bare with me: I am trying to group my results by the last activity on each row, my query looks like this select text, dt, item_id from table where group by item_id order by dt DESC here is an example record set. text1,2006-06-28

Re: Tough query to crack

2006-06-28 Thread Peter Brawley
What if @ContextID is an input variable to the procedure. What can we do then? I'm sorry if this seems very academic, but I'm rather new to the stored procedure thing and only a little better at SQL statements as a whole:) Give the param a name which cannot conflict with an existing column

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Martin Jespersen
Indeed fulltext searches was the cure i was looking for. Queries went from over 116 seconds to less than half a second thx for the tip ;) Dan Buettner wrote: Martin, currently there is not a way to optimize that particular type of query. You might consider changing to fulltext indexes and

Re: Distinct problem

2006-06-28 Thread Dan Buettner
Use the MAX() function, like so: select text, MAX(dt) as dt, item_id from table where group by item_id order by dt DESC Dan On 6/28/06, Tanner Postert [EMAIL PROTECTED] wrote: The situation is somewhat hard to describe, so please bare with me: I am trying to group my results by the

Re: Distinct problem

2006-06-28 Thread Peter Brawley
Tanner I am trying to group my results by the last activity on each row, my query looks like this select text, dt, item_id from table where group by item_id order by dt DESC SELECT t1.item_id, t1.dt, t1.text FROM table AS t1 LEFT JOIN table AS t2 ON t1.item_id = t2.item_id AND

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Martin Jespersen
I was too fast there it seems fulltext searches doesn't help after all since i can't use leading wildcards to words :( too bad i loved the speed :/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: MySQL Denormalized

2006-06-28 Thread John Hicks
Jan Gomes wrote: Hy Guys, I needed denormalized my table to obtain high performance, but i want best appropriate the space. I joint two column (of the JOIN) intro one column with two separadores (# and ;) Example: ID | column_1 | column_denormalized 1 | Test | 1#20202;5#1000101;