Re: BLOB Source

2005-11-14 Thread Gleb Paharenko
Hello. There is a good artice: http://www.onlamp.com/pub/a/php/2000/09/15/php_mysql.html Archives at lists.mysql.com are your best friends. See, say: http://lists.mysql.com/mysql/165229 >Can someone please post some asp or php working with BLOB Files, and >how to >Get files into

Re: How to reload my.cnf?

2005-11-14 Thread Gleb Paharenko
Hello. You can change some variables without restarting the server. See: http://dev.mysql.com/doc/refman/5.0/en/dynamic-system-variables.html Tedy Aulia wrote: > Hi All, > > I will need to change my.cnf in master machine, but I can't afford to > restart MySQL server as the server has

Re: client/server differences

2005-11-14 Thread Gleb Paharenko
Hello. There should be only one issue, because the MySQL 5.0 server has a new implementation of the DECIMAL data type. See C API Changes at: http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html >I'm looking to use a RHEL4 server with standard RHEL4 packages to >connect to

Re: Sub Query

2005-11-14 Thread Gleb Paharenko
Hello. Not enough information to make a conclusion. At least for me this query didn't return any error: mysql> create table messages(id int); Query OK, 0 rows affected (0.02 sec) mysql> create table message_push_notifications(message_id int); Query OK, 0 rows affected (0.01 sec) mysq

Re: General logging vs. bin logging

2005-11-14 Thread Gleb Paharenko
Hello. I'm a bit confused with the subject. Have you tried the General query log or not? See: http://dev.mysql.com/doc/refman/5.0/en/Query_log.html Clyde Lewis wrote: > Hello, > > I'm trying to get a handle on who is making what changes in my database, > but cannot seem to find user

Re: Duplicate Insert Crashes Client

2005-11-14 Thread Gleb Paharenko
Hello. > Ok new problem. If for some reason, my client tries to INSERT >something Please could you answer, what kind of client do you mean. Is it your own client application or mysql command line client or something else? If it is yours and it is small, you can send the code to the list,

Re: Let mysql calculate levenshtein-distance

2005-11-14 Thread Gleb Paharenko
Hello. Probably, yes. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html http://dev.mysql.com/doc/refman/5.0/en/adding-functions.html Horst Jäger wrote: > > Hi, > > I have a nice little code snippet in pseudocode, which calculates the > levenshtein-

Re: With Rollup wrong results

2005-11-14 Thread Gleb Paharenko
Hello. In my opinion, you have something wrong with you query in general. product.price field is in SELECT part and not in GROUP BY, so the results not-predictable. See: http://dev.mysql.com/doc/refman/5.0/en/group-by-hidden-fields.html Noel Stratton wrote: > I am running the query be

Re: With Rollup wrong results

2005-11-14 Thread Michael Stassen
Noel Stratton wrote: I am running the query below: SELECT products.product, products.price, count( log.product ) AS 'Count', ROUND(price*count(log.product), 2) AS 'Total' FROM products LEFT JOIN log ON products.product= log.product GROUP BY product with rollup Here are the results: +---

Re: Anyone use Snort and Acid?

2005-11-14 Thread Ed Kasky
I just discovered that BASE is a newer version of ACID based on some of the same code. It too returns single digit numbers where the signature description should be on the results screen. I will check out SQUIL. Thanks for the tip At 08:22 PM Monday, 11/14/2005, you wrote -=> On Sun, Nov 1

RE: where is the mistake in this SQL statement?

2005-11-14 Thread Sujay Koduri
You havent specified the datatype for the column 'id'. sujay -Original Message- From: Peter Matulis [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 15, 2005 10:57 AM To: mysql@lists.mysql.com Subject: where is the mistake in this SQL statement? { this is a resend, forgot subject in

where is the mistake in this SQL statement?

2005-11-14 Thread Peter Matulis
{ this is a resend, forgot subject in original posting } Hello, I am using MySQL 4.0.24 on OpenBSD 3.8. I am having difficulty creating a SQL schema. My attempts contain lines like: CREATE TABLE users ( id PRIMARY KEY, priority integer NOT NULL DEFAULT '7', policy_id integer unsigned NOT

Re: Anyone use Snort and Acid?

2005-11-14 Thread Rhino
> . . . . . . . . . . . . . . . . . . > Randomly Generated Quote (125 of 1011): > "It must be a peace without victory Only a peace between equals > can last." --Woodroe Wilson > Whoever generated this quote needs to use a spellchecker; the correct spelling is WOODROW Wilson. Rhino -- No

Re: Newbie Question

2005-11-14 Thread Rhino
Just to amplify what Michael has said If you had a table with 50 columns and created a separate index for each of those columns, then you'd probably get some performance benefit from having those indexes. But you'd also have to absorb the following overhead: 1. For each new row that you create

Re: Anyone use Snort and Acid?

2005-11-14 Thread Jason Martin
On Sun, Nov 13, 2005 at 08:56:12PM -0800, Ed Kasky wrote: > Snort v2.4.3 > ACID v0.9.6b23 I seem to recall hearing that ACID is deprecated; you might want to look around if there is a newer equivalent. SQUIL (http://sguil.sourceforge.net/) is supposed to be really good. -Jason Martin -- I have a

Re: OT: Training Materials

2005-11-14 Thread Jeffrey G. Ubalde
Cory, We would love to take that training. But unfortunately, management cant afford that. (even if we think they can :) there are no budgets alloted for that.) The only thing we have is bandwidth, our peers and forums (I have been lurking here for a while now and have learned a lot already).

Re: OT: Training Materials

2005-11-14 Thread Cory @ SkyVantage
MySQL AB offers great training! http://www.mysql.com/training/ In the long run, getting training right from the true experts is going to be your best bang for your buck. Trust me, I know from experience on this one. Cory. Jeffrey G. Ubalde wrote: Anybody here who have conducted MySQL tra

OT: Training Materials

2005-11-14 Thread Jeffrey G. Ubalde
Good Day Again. Anybody here who have conducted MySQL training before? I was wondering if somebody here have training materials/presentation they could share that we can use for internal training within our group. Any presentation related to SQL or RDBMS for that matter would greatly be appric

Re: Newbie Question

2005-11-14 Thread Scott Noyes
> > I would just like to ask a somewhat not so intelligent question. What > > is the downside of indexing almost all of the fields in a table? Is it > > advisable? > > Indexes have to be built They also consume disk space, so if you're tight on hard drives, they might put you over the top. -- Sco

Re: Newbie Question

2005-11-14 Thread Michael J. Pawlowsky
Jeffrey G. Ubalde wrote: Good day list! I would just like to ask a somewhat not so intelligent question. What is the downside of indexing almost all of the fields in a table? Is it advisable? Indexes have to be built... so if you did that, for every query that alters the data many index

Re: With Rollup wrong results

2005-11-14 Thread Björn Persson
Noel Stratton: > As you can see the summary total in the 'Total' column is incorrect. The > summary total should be 36 but is spitting out 40. I am not even sure > where it is getting 40. The only way to get 40 is if it is multiplying > 5X8. Isn't that what you told it to do? > ROUND(price*cou

Anyone use Snort and Acid?

2005-11-14 Thread Ed Kasky
I am posting to this list in hopes that someone might have a clue as to why I might be experiencing a problem since upgrading to 5.0.15. Setup is as follows: Snort v2.4.3 MySql v5.0.15 ACID v0.9.6b23 RedHat 7.2 Since upgrading MySql from 4.1.15 to 5.0.15, Acid does not display the "signature"

Re: Can this SQL query be done with MySql?

2005-11-14 Thread Rhino
See remarks interspersed below Rhino - Original Message - From: "WARVIN BARKER" <[EMAIL PROTECTED]> To: Sent: Monday, November 14, 2005 10:44 AM Subject: Can this SQL query be done with MySql? > Hi! > > I have a MySQL table with perid (person id), CaseId (the latter two fields are

Re: Database IDs

2005-11-14 Thread Björn Persson
Gleb Paharenko: > So in you query both last_insert_id() should return the same value, > which equals to the value that was set for an AUTO_INCREMENT column by > the last INSERT or UPDATE query. Note that you have one query, which > just inserts several rows, so during it is processed the returned v

Re: Sub Query

2005-11-14 Thread Rhino
That's pretty hard to do; you haven't said what the query is trying to do and you haven't supplied definitions of the tables you are using or provided a few rows of sample data so that we could form a mental picture of what you are trying to accomplish. Also, you haven't stated what version of MySQ

Re: Duplicate Insert Crashes Client

2005-11-14 Thread Patrick
What type client are you using? With the C API you would test for the return value (0 or 1) and process accordingly. You could use 'INSERT IGNORE' syntax, but then you would not know what records failed (you could test for how many were inserted with mysql_info() using the C API). See Chap

Can this SQL query be done with MySql?

2005-11-14 Thread WARVIN BARKER
Hi! I have a MySQL table with perid (person id), CaseId (the latter two fields are varchar). The persons (perid) can be on more than one case. They can get married and change caseids, or they can come of age and get their own caseid. So a given perid can be associated with multiple caseids

Re: Let mysql calculate levenshtein-distance

2005-11-14 Thread Jason Pyeron
On Mon, 14 Nov 2005, Rhino wrote: If you are asking whether MySQL already has a function that will calculate a levenshtein-distance, I'm pretty sure that the answer is no. You can check the MySQL manual yourself to be sure. The (English language manuals are at http://dev.mysql.com/doc/ and other

5.0.15 Compile error on Redhat EL4.0

2005-11-14 Thread Stewart, Eric
Sent this before but didn't get a response ... So sending again ... Compiling from source: Platform is RHEL 4.0 # gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --en

Re: Will SELECT COUNT(*) FROM TABLE ever be cheap on INNODB?

2005-11-14 Thread Rhino
Just to contribute a different point of view, let me tell you what happens in DB2. DB2 has positions in its catalog, also known as meta data, to keep all kinds of statistics about the data, including the number of rows in each table. However, the designers made an executive decision in the early d

RE: MySQL 4.18 Performance Question

2005-11-14 Thread Logan, David (SST - Adelaide)
Hi Shahryar, These pages may help : http://dev.mysql.com/doc/refman/5.0/en/optimization.html The other command you may find useful is the OPTIMIZE table command documented here : http://dev.mysql.com/doc/refman/5.0/en/optimize-table.html Regards David Logan Database Administrator HP Managed Se

MySQL 4.18 Performance Question

2005-11-14 Thread Shahryar G. Hashemi
Hello, We are running a MySQL 4.18 database as a read-only snapshot of an internal Sybase database. We have seen an increase in core tables where now we have several million records of data in the MySQL tables. Suddenly the SELECT queries we ran before which took few seconds are now taking m

net_printf

2005-11-14 Thread Peter Duffy
Some months ago, I wrote a MySQL user-defined procedure (based on sql_analyse.cc). It works well (has survived a test of 200M queries): however, at the moment, I'm reviewing the code and trying to make it more robust. As part of this, I'm trying to send error messages back to the mysql client, and

Re: Let mysql calculate levenshtein-distance

2005-11-14 Thread Rhino
If you are asking whether MySQL already has a function that will calculate a levenshtein-distance, I'm pretty sure that the answer is no. You can check the MySQL manual yourself to be sure. The (English language manuals are at http://dev.mysql.com/doc/ and other translations of the manuals can also

How to reload my.cnf?

2005-11-14 Thread Tedy Aulia
Hi All, I will need to change my.cnf in master machine, but I can't afford to restart MySQL server as the server has been used for heavy traffic databases. Can anyone tell me how to do it? Cheers, *Tedy Aulia*

Re: Will SELECT COUNT(*) FROM TABLE ever be cheap on INNODB?

2005-11-14 Thread sheeri kritzer
Hi all, I know I'm a bit late in coming to this discussion. Glad to see that this problem is on the InnoDB to-do list. I will put out that one thing you can do is utilize triggers. Make a separate table with one field, and put a trigger on the table you want counted so that every time there is

General logging vs. bin logging

2005-11-14 Thread Clyde Lewis
Hello, I'm trying to get a handle on who is making what changes in my database, but cannot seem to find user/account info in the bin-logs besides the actual update that was made. Is there a way in which MySQL logs not only the changes, but also the user account that updated a record in the da

Re: Let mysql calculate levenshtein-distance

2005-11-14 Thread Jason Pyeron
yes, create a UDF. look at the mysql source for examples... On Mon, 14 Nov 2005, Horst [iso-8859-1] J?ger wrote: Hi, I have a nice little code snippet in pseudocode, which calculates the levenshtein-distance between 2 words. Is it possible to implement that code in mysql like in "select

With Rollup wrong results

2005-11-14 Thread Noel Stratton
I am running the query below: SELECT products.product, products.price, count( log.product ) AS 'Count', ROUND(price*count(log.product), 2) AS 'Total' FROM products LEFT JOIN log ON products.product= log.product GROUP BY product with rollup Here are the results: +--+---

Duplicate Insert Crashes Client

2005-11-14 Thread Bruce Martin
Hello again, Ok new problem. If for some reason, my client tries to INSERT something to the database that is identical to a record already there, my client crashes. Is there an error I can trap for this? The DB does insert the new record. Bruce Martin The Martin Solution PO Box 644 Delaware

[OT]Re: character sets.....(missing info)

2005-11-14 Thread mel list_php
For information for other people who would have the same problem: Warning Do not issue the query 'set names' with Connector/J, as the driver will not detect that the character set has changed, and will continue to use the character set detected during the initial connection setup. To allow mu

compilation of mysql-5.0.15 on Solaris 5.9

2005-11-14 Thread Douglas B. Jones
I am trying to compile mysql-5.0.15 on Solaris 5.9 with the following options: CC=cc;export CC CFLAGS="-Xa -fast -native -xstrconst -mt -xarch=v9";export CFLAGS CXX=CC;export CXX CXXFLAGS="-noex -mt -xarch=v9" ASFLAGS="-xarch=v9";export CXXFLAGS ./configure --prefix=/usr/local/mysql --enable-asse

Re: Updating a LONGTEXT field

2005-11-14 Thread Whil Hentzen
I've looked at concat and other string functions as well as searched on 'update' and 'longtext', but the results haven't been useful. Am I missing something easy, or will this be more involved than a simple one-line SQL statement? You obviously didn't look at CONCAT that hard... UPDATE mytab

Re: Sub Query

2005-11-14 Thread SGreen
Herman Scheepers <[EMAIL PROTECTED]> wrote on 11/13/2005 11:53:23 AM: > Hi > > Could anyone help perhaps tell me why the following > simple query containing a sub-query gives a syntax > error. > > select 1 from messages > where not exists ( select 1 from > message_push_notifications >

RE: BLOB Source

2005-11-14 Thread J.R. Bullington
You are going to need some sort of Upload software. For this example, we are going to use Persits.Upload for the upload manager. <% Set Upload = Server.CreateObject("Persits.Upload") 'need to download ASPUpload to use this. Upload.IgnoreNoPost = true 'ASPUpload Specific

Re: LIKE problem?

2005-11-14 Thread Gleb Paharenko
Hello. Really, seems a bit weird for me. I suggest you to check your 'character_set_xxx' variables to be sure that there're no unnecessary translations from one encoding to another. If you're able to make a small repeatable test case, install on your Debian server second instance of MySQL (u

Re: mysql_init(&m) changes values of variables

2005-11-14 Thread Paul DuBois
At 11:33 -0500 11/13/05, Bruce Martin wrote: Ok I have an update. I fixed my problem by passing a NULL parameter to mysql_init() to do this I did this: MYSQL *m; m=mysql_init(NULL); connection=mysql_real_connect(m,cStrdbServer,cStrdbUser,cStrdbUserPass,cStrdbName,0,NULL,0); Which solves the m

PHP installation problem

2005-11-14 Thread Uthra Rao
I am having a hard time compiling php 5.0.5 on solaris 10. I have already installed mysql 5.0.15 (Binary) 64-bit. ./configure --prefix=/PATH/php505 --with-apxs2=/PATH/apache/bin/apxs --with-mysql=/PATH/mysql/ --enable-dbase --with-zlib-dir=/path/php505/ --with-pear This ends with -> "error:

Re: Database IDs

2005-11-14 Thread Gleb Paharenko
Hello. In the manual we have: " Returns the first automatically generated value that was set for an AUTO_INCREMENT column by the last INSERT or UPDATE query to affect such a column." So in you query both last_insert_id() should return the same value, which equals to the value that was s

Sub Query

2005-11-14 Thread Herman Scheepers
Hi Could anyone help perhaps tell me why the following simple query containing a sub-query gives a syntax error. select 1 from messages where not exists ( select 1 from message_push_notifications where message_id = messages.id) Thanx Herman _

Let mysql calculate levenshtein-distance

2005-11-14 Thread Horst Jäger
Hi, I have a nice little code snippet in pseudocode, which calculates the levenshtein-distance between 2 words. Is it possible to implement that code in mysql like in "select word1,word2 from myTable order by dist(word1,word2 )" where dist is the function mentionend above which takes 2 stri

Re: Named Pipe for General Query Log

2005-11-14 Thread Jake Peavy
Hey, I sent this a while ago, but never received a response. This still seems to exist under 5.0.15-standard (at least under mysql-standard-5.0.15-linux-i686-glibc23) Can anyone from MySQL comment on this or should I open it as a bug? Thanks, JP On 6/11/05, Jake Peavy <[EMAIL PROTECTED]> wrote:

BLOB Source

2005-11-14 Thread Brian E Boothe
Can someone please post some asp or php working with BLOB Files, and how to Get files into a Mysql Database,, in working woth PDF Files thanks