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
, 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
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
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
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
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!
--
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
: 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
[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
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
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
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
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
[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
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
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
[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
[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
[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
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
-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
?
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
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:
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
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:
, 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
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
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
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
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
---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
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
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;
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
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
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
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
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
--
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
59 matches
Mail list logo