Default Values for Max User and Max Connections.

2012-09-21 Thread Wayne Leutwyler
Hello All, Question. In mysql 5.5 what are the defaults for these values: max_connections = ? (is this set to 151 in 5,5) max_user_connections = ?(is this set to unlimited unless you provide the exact number)? Thank you so much. Wayne Leutwyler, RHCT Open Source + Open

RE: Default Values for Max User and Max Connections.

2012-09-21 Thread Rick James
, 2012 7:04 AM To: mysql@lists.mysql.com Subject: Default Values for Max User and Max Connections. Hello All, Question. In mysql 5.5 what are the defaults for these values: max_connections = ? (is this set to 151 in 5,5) max_user_connections = ? (is this set to unlimited

Re: Query producing default values

2005-11-11 Thread Jacques Brignon
Thanks to all those who provided feed back. As a result I found two ways of solving my problem, one is going along the LEFT JOIN track, and the other one is to run a script before doing the query itself whioch is doable in my environment without modifying the core software and which can then do

Query producing default values

2005-11-09 Thread Jacques Brignon
I have a query which scans a subscription databse to locte the most recent expiration date of the subscription to a given periodical or service to compute the start date of a renewal. It works fine when for a given person such a subscription exists. If none exists, as expected the query produces

Re: Query producing default values

2005-11-09 Thread SGreen
Jacques Brignon [EMAIL PROTECTED] wrote on 11/09/2005 09:58:07 AM: I have a query which scans a subscription databse to locte the most recent expiration date of the subscription to a given periodical or serviceto compute the start date of a renewal. It works fine when for a given person

Re: Query producing default values

2005-11-09 Thread Jacques Brignon
Thanks, that makes a lot of sense. My only problem is that I am using here a standard piece of code on the application side and I would hate to modify it, the thing I have all liberty to change is the query! Reason for trying to ask the query itself to tell me if there is nothing in the DB! --

Re: Query producing default values

2005-11-09 Thread Harald Fuchs
In article [EMAIL PROTECTED], Jacques Brignon [EMAIL PROTECTED] writes: Thanks, that makes a lot of sense. My only problem is that I am using here a standard piece of code on the application side and I would hate to modify it, the thing I have all liberty to change is the query! Reason for

RE: Query producing default values

2005-11-09 Thread Gordon Bruce
: mysql@lists.mysql.com Subject: Re: Query producing default values Thanks, that makes a lot of sense. My only problem is that I am using here a standard piece of code on the application side and I would hate to modify it, the thing I have all liberty to change is the query! Reason for trying to ask

Re: Query producing default values

2005-11-09 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Jacques Brignon [EMAIL PROTECTED] wrote on 11/09/2005 09:58:07 AM: I have a query which scans a subscription database to locate the most recent expiration date of the subscription to a given periodical or service to compute the start date of a renewal. It works fine

default values

2005-02-08 Thread Emmett Bishop
Howdy all, is it possible to force a field to be NOT NULL but not have any default value (I.E the insert statement must explicitly provide data for the field in question)? Cheers, Tripp __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best

Re: default values

2005-02-08 Thread Jeff Smelser
On Tuesday 08 February 2005 03:32 pm, Emmett Bishop wrote: is it possible to force a field to be NOT NULL but not have any default value (I.E the insert statement must explicitly provide data for the field in question)? of course: col1 int not null Jeff pgpKRoQG6Ktfo.pgp Description: PGP

Problem with timestamp default values

2004-01-27 Thread Predrag Malicevic
Hi, There seems to be a problem with setting default values for the timestamp column type in version 4.0.17: mysql create table test (t timestamp default '2001-01-01 00:00:00' not null); ERROR 1067: Invalid default value for 't' In 4.0.16 this works normally: mysql create table test (t

Enum default values

2004-01-05 Thread Richard Dyce
Hi, I'm having problems with setting default values for an enum. It's for a booking system, and I'm keeping track of which day a property starts a booking period. It's useful to have the enum in day order therefore. Omitting the prompts, here's what's happening; * drop table property

RE: Enum default values

2004-01-05 Thread Jay Blanchard
[snip] insert into property values ('','Book-keeper\'s Cottage','Thu'); insert into property values ('','Inglenook Barn','Fri'); insert into property values ('','Maggie\'s House','Fri'); insert into property values ('','Riverside View',''); insert into property values ('','The Manse',''); insert

Re: Enum default values

2004-01-05 Thread Richard Dyce
Jay! Thanks for help with a 'proper' insert. ;-) Yes, the full statement works fine. (I assume this is something like the not setting default values from importing DATA files?) All a bit of a shame, as I'm executing the insert from a PHP script, and was trying to make the routine as generic

Re: Enum default values

2004-01-05 Thread Martijn Tonies
Hi, [snip] insert into property values ('','Book-keeper\'s Cottage','Thu'); insert into property values ('','Inglenook Barn','Fri'); insert into property values ('','Maggie\'s House','Fri'); insert into property values ('','Riverside View',''); insert into property values ('','The

RE: Enum default values

2004-01-05 Thread Jay Blanchard
[snip] Yes, the DEFAULT doesn't apply. However, shouldn't MySQL raise an exception because '' isn't a valid value for this ENUM specification? [/snip] From http://www.mysql.com/doc/en/ENUM.html The value may also be the empty string () or NULL under certain circumstances: If you insert an

Re: Enum default values

2004-01-05 Thread Martijn Tonies
[snip] Yes, the DEFAULT doesn't apply. However, shouldn't MySQL raise an exception because '' isn't a valid value for this ENUM specification? [/snip] From http://www.mysql.com/doc/en/ENUM.html The value may also be the empty string () or NULL under certain circumstances: If you

RE: Enum default values

2004-01-05 Thread Jay Blanchard
[snip] If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value. This string can be distinguished from a 'normal' empty string by the fact that this string has the numerical value

Re: Enum default values

2004-01-05 Thread Martijn Tonies
Hi, [snip] If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value. This string can be distinguished from a 'normal' empty string by the fact that this string has the

Re: Enum default values

2004-01-05 Thread Michael Stassen
-transactional tables all fields in MySQL have default values. If you insert a 'wrong' value in a column like a NULL in a NOT NULL column or a too big numerical value in a numerical column, MySQL will instead of giving an error instead set the column to the 'best possible value'. In the case

Re: Enum default values

2004-01-05 Thread Martijn Tonies
? To be able to support easy handling of non-transactional tables all fields in MySQL have default values. If you insert a 'wrong' value in a column like a NULL in a NOT NULL column or a too big numerical value in a numerical column, MySQL will instead of giving an error instead set the column

Re[2]: Enum default values

2004-01-05 Thread Aleksandar Bradaric
Hi, I will now have to supply a field list to the function in addition. Ah well ;-) Maybe this help: insert into `property` values ('', 'Riverside View', default); Take care, Aleksandar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Re[2]: Enum default values

2004-01-05 Thread Richard Dyce
not explicitly given a value is set to its default value. For example, if you specify a column list that doesn't name all the columns in the table, unnamed columns are set to their default values. Default value assignment is described in section 6.5.3 CREATE TABLE Syntax. You can also use the keywordDEFAULT

Prepared statements and default values

2003-12-30 Thread Yosef Teitz
I see that in the prepared statements C API, I can specify to the bind parameter that the value is supposed to be null using MYSQL_BIND.is_null. Is there any support for the MYSQL_BIND object to use a column's default value? - Yossie -- MySQL General Mailing List For list archives:

RE: not null and default values confusion

2003-11-01 Thread Jan Magnusson
, November 01, 2003 05:13 To: Jan Magnusson Cc: Mysql General mailing list Subject: Re: not null and default values confusion Jan, This question comes up a lot. You should take a look at http://www.mysql.com/doc/en/constraint_NOT_NULL.html. The first line is, To be able to support easy handling

Re: not null and default values confusion

2003-11-01 Thread Martijn Tonies
Hi, This question comes up a lot. You should take a look at http://www.mysql.com/doc/en/constraint_NOT_NULL.html. The first line is, To be able to support easy handling of non-transactional tables, all fields in MySQL have default values. Mysql automatically converts missing or illegal

not null and default values confusion

2003-10-31 Thread Jan Magnusson
Dear List, Could sombody explain this behaviour of mySQL 4 to me: Assigning a column as not null will AUTOMATICALLY assign (=force upon) it a default value of an empty string ('') if a string or zero (0) if a numerical datatype. Thereby effectively bypassing all and every error message during

Re: not null and default values confusion

2003-10-31 Thread Michael Stassen
Jan, This question comes up a lot. You should take a look at http://www.mysql.com/doc/en/constraint_NOT_NULL.html. The first line is, To be able to support easy handling of non-transactional tables, all fields in MySQL have default values. Mysql automatically converts missing or illegal

bind params and default values

2003-10-27 Thread sean peters
Hi all, i've been having an issue with binding params. If i have created an INSERT query with a param binding to a particular column, call it column A, is there any way that i can use that (prepared) query to get the db defined default value into column A? Im at a loss! thanks much, sean

RE: bind params and default values

2003-10-27 Thread Dathan Vance Pattishall
---Original Message- --From: sean peters [mailto:[EMAIL PROTECTED] --Sent: Monday, October 27, 2003 10:17 AM --To: [EMAIL PROTECTED] --Subject: bind params and default values -- --Hi all, i've been having an issue with binding params. If i have created --an --INSERT query with a param

RE: bind params and default values

2003-10-27 Thread Dathan Vance Pattishall
and default values --INSERT INTO my_table (A, B) VALUES ( COALESCE(?, A), COALESCE(?, B) ) -- --I think this should work, but am now wondering how much time this will --actually save me. I say this because in this situation, even though the --query --is preparsed, mysql still needs to calculate

Re: Functions as default values

2003-08-14 Thread Cybot
I am trying to use a function as a default value for a column but do not seem to get the desired result. I want to use the NOW() function for a last_updated column, here is my code... CREATE TABLE test_table ( last_updated datetime NOT NULL default `NOW()` ) TYPE=MyISAM; This gives an error;

Functions as default values

2003-08-07 Thread Phil Ewington - 43 Plc
Hi All, I am trying to use a function as a default value for a column but do not seem to get the desired result. I want to use the NOW() function for a last_updated column, here is my code... CREATE TABLE test_table ( last_updated datetime NOT NULL default `NOW()` ) TYPE=MyISAM; This gives an

RE: Functions as default values

2003-08-06 Thread Phil Ewington - 43 Plc
No functions as default values is a bummer, but timestamp will do he trick, so thanks for your help; much appreciated. Phil. -Original Message- From: Cybot [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 15:37 To: [EMAIL PROTECTED] Subject: Re: Functions as default values I am trying

Displaying Default Values

2002-10-09 Thread Lawrence S. Stephens III
I am useing mysql Ver 11.18 Distrib 3.23.52, for pc-linux-gnu (i686). I have set up a table in which one of the fields have a default value (i.e. New York). When I INSERT a record, that field is empty so that the default value is inserted into the field automatically (at least that's what I

Re: Displaying Default Values

2002-10-09 Thread Keith C. Ivey
On 9 Oct 2002, at 13:14, Lawrence S. Stephens III wrote: When I INSERT a record, that field is empty so that the default value is inserted into the field automatically (at least that's what I think). If your query is setting the column to the empty string, then you're setting it to the

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
sql Hello I need a ENUM to default to a value when it gets a NULL. Can this be done. Right now is I set the column to FIELD ENUM('NO','YES') NOT NULL It fails to insert when a NULL is entered. I want it to default to NO Can I set it to do this? Ruben --

Re: ENUM Default values on NULL

2002-04-12 Thread Steve Katen
ENUM can handle your needs. you should be able to just change your syntax to: FIELD ENUM('NO','YES') NULL under that syntax your default value will be NULL. this is from the documentation directly: If an ENUM is declared NULL, NULL is also a legal value for the column, and the default value

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
ENUM can handle your needs. you should be able to just change your syntax to: FIELD ENUM('NO','YES') NULL under that syntax your default value will be NULL. We need it to default to 'NO' not NULL sql Ruben - Before

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
sql ENUM can handle your needs. you should be able to just change your syntax to: FIELD ENUM('NO','YES') NULL under that syntax your default value will be NULL. I need it to default to 'NO' not NULL - Before

Re: ENUM Default values on NULL

2002-04-12 Thread Steve Katen
Ruben, If you leave it as NOT NULL it should default to NO. If an ENUM is declared NOT NULL, the default value is the first element of the list of allowed values. SIDE QUESTION: Are you doing something like: select * from table where enum_colum=NO If you are running that type of query it

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
When I send a NULL it's rejected as bad data, which sort of makes sense On 2002.04.12 12:33 Steve Katen wrote: Ruben, If you leave it as NOT NULL it should default to NO. If an ENUM is declared NOT NULL, the default value is the first element of the list of allowed values. The

Re: ENUM Default values on NULL

2002-04-12 Thread Gerald Clark
Steve Katen wrote: Ruben, If you leave it as NOT NULL it should default to NO. If an ENUM is declared NOT NULL, the default value is the first element of the list of allowed values. SIDE QUESTION: Are you doing something like: select * from table where enum_colum=NO If you are

Re: ENUM Default values on NULL

2002-04-12 Thread Steve Katen
Ruben, If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value. it is inserting the value as the first value in the table which is the error value or the index of 0. i would

Re: ENUM Default values on NULL

2002-04-12 Thread Michael Stassen
Instead of inserting NULL, leave the column out. INSERT mytable (2nd_col_name) VALUES (NULL); If you don't mention the enum column, it gets the default. Michael On Fri, 12 Apr 2002, Ruben I Safir wrote: When I send a NULL it's rejected as bad data, which sort of makes sense On

Re: ENUM Default values on NULL

2002-04-12 Thread Michael Stassen
On Fri, 12 Apr 2002, Steve Katen wrote: Ruben, If you leave it as NOT NULL it should default to NO. If an ENUM is declared NOT NULL, the default value is the first element of the list of allowed values. SIDE QUESTION: Are you doing something like: select * from table where

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
Your example is not the same, it sends only one value to a 2 value table. It definetely does not work if you send NULL INSERT VALUES(NULL) Ruben On 2002.04.12 14:10 Michael Stassen wrote: On Fri, 12 Apr 2002, Steve Katen wrote: Ruben, If you leave it as NOT NULL it should default

Re: ENUM Default values on NULL

2002-04-12 Thread Michael Stassen
Ruben, I think youare referring to my earlier message, but no matter. You cannot insert NULL into a column you've defined as NOT NULL, with some special exceptions (auto_increment and timestamp, for example). As I said before, if you want a column to get its default value, you leave it out of

default values

2001-11-22 Thread Mark
When I do a describe statement, I see some default values assigned automatically to columns in the table. What statement will assign a column to blank, so that there is no default value assigned? - Before posting, please check

Re: default values

2001-11-22 Thread Carl Troein
Mark writes: When I do a describe statement, I see some default values assigned automatically to columns in the table. What statement will assign a column to blank, so that there is no default value assigned? Short answer: you can't. There was a long thread about this a week or two ago

Re: Functions as default values

2001-09-24 Thread Rodney Broom
From: Gerald Clark [EMAIL PROTECTED] Default values must be constants. Håkan Elmqvist wrote: Now I want to register who changed it... === MY two cents worth: With MySQL, this sort of thing usually gets handled in a piece of software. In Perl, we might say something like: $sth = $dbh

Functions as default values

2001-09-22 Thread Håkan Elmqvist
Timestamp is a useful datatype when you want to register when a record changed. Now I want to register who changed it and tried to use user() as a default value and my database just returned user() as the field value. Is there someone who can tell me how to use a function result as default

Re: Default values

2001-03-07 Thread Gerald L. Clark
able(using MySQL 3.23.33), using default values: DROP TABLE IF EXISTS referral; CREATE TABLE referral ( refer_id int(10) UNSIGNED DEFAULT '100' NOT NULL, refer_fname varchar(20) DEFAULT '' NOT NULL, refer_lname varchar(20) DEFAULT '' NOT NULL, refer_email varchar(40) DEFAULT '' NOT NULL

Re: Default values

2001-03-07 Thread MikemickaloBlezien
On Tue, 6 Mar 2001 11:14:36 +0100, Fred van Engen [EMAIL PROTECTED] wrote: Thanks Fred, INSERT INTO referral VALUES (NULL, 'xxx.yyy', 'xxx.yyy', '[EMAIL PROTECTED]'); But an INSERT like this: This is where I was making the mistake! It works fine now. I was inserting an blank empty value

Re: Default values

2001-03-07 Thread Jan Bruvoll
On Tue, 6 Mar 2001, MikemickaloBlezien wrote: Try giving a number instead of a string as a default for an int. Not sure I follow, it is a number?? refer_id int(10) UNSIGNED DEFAULT '100' NOT NULL, Your '100' is a string. Try something like this: refer_id int(10) UNSIGNED NOT NULL DEFAULT

Re: Default values

2001-03-06 Thread Fred van Engen
On Mon, Mar 05, 2001 at 10:26:58PM -0600, MikemickaloBlezien wrote: Hello All, I've created a table(using MySQL 3.23.33), using default values: DROP TABLE IF EXISTS referral; CREATE TABLE referral ( refer_id int(10) UNSIGNED DEFAULT '100' NOT NULL, refer_fname varchar(20) DEFAULT

Re: Default values

2001-03-06 Thread MikemickaloBlezien
On Tue, 06 Mar 2001 09:18:34 -0600, "Gerald L. Clark" [EMAIL PROTECTED] wrote: Gerald, Try giving a number instead of a string as a default for an int. Not sure I follow, it is a number?? "MikeBlezien" wrote: Hello All, I've created a table(using MySQL 3.2

Default values

2001-03-05 Thread MikemickaloBlezien
Hello All, I've created a table(using MySQL 3.23.33), using default values: DROP TABLE IF EXISTS referral; CREATE TABLE referral ( refer_id int(10) UNSIGNED DEFAULT '100' NOT NULL, refer_fname varchar(20) DEFAULT '' NOT NULL, refer_lname varchar(20) DEFAULT '' NOT NULL, refer_email