| bk commit into 5.0 tree (jimw:1.1797) |
|
 |
Index ‹ mysql
|
- Previous
- 3
- svn commit - mysqldoc@docsrva: r170 - in trunk: . refman-4.1 refman-5.0 refman-5.1Author: paul
Date: 2005-10-26 02:31:02 +0200 (Wed, 26 Oct 2005)
New Revision: 170
Log:
r3131@frost: paul | 2005-10-25 13:25:56 -0500
Correct misleading --tmpdir description.
Modified:
trunk/
trunk/refman-4.1/client-side-scripts.xml
trunk/refman-5.0/client-side-scripts.xml
trunk/refman-5.1/client-side-scripts.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:3093
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:182
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:3131
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:182
Modified: trunk/refman-4.1/client-side-scripts.xml
===================================================================
--- trunk/refman-4.1/client-side-scripts.xml 2005-10-25 16:03:16 UTC (rev 169)
+++ trunk/refman-4.1/client-side-scripts.xml 2005-10-26 00:31:02 UTC (rev 170)
@@ -617,8 +617,8 @@
</para>
<para>
- Use the named directory as the location in which to write
- the temporary table.
+ Use the named directory as the location where
+ <command>myisamchk</command> creates temporary files.
</para>
</listitem>
Modified: trunk/refman-5.0/client-side-scripts.xml
===================================================================
--- trunk/refman-5.0/client-side-scripts.xml 2005-10-25 16:03:16 UTC (rev 169)
+++ trunk/refman-5.0/client-side-scripts.xml 2005-10-26 00:31:02 UTC (rev 170)
@@ -598,8 +598,8 @@
</para>
<para>
- Use the named directory as the location in which to write
- the temporary table.
+ Use the named directory as the location where
+ <command>myisamchk</command> creates temporary files.
</para>
</listitem>
Modified: trunk/refman-5.1/client-side-scripts.xml
===================================================================
--- trunk/refman-5.1/client-side-scripts.xml 2005-10-25 16:03:16 UTC (rev 169)
+++ trunk/refman-5.1/client-side-scripts.xml 2005-10-26 00:31:02 UTC (rev 170)
@@ -598,8 +598,8 @@
</para>
<para>
- Use the named directory as the location in which to write
- the temporary table.
+ Use the named directory as the location where
+ <command>myisamchk</command> creates temporary files.
</para>
</listitem>
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 3
- LEFT JOIN?Hi,
I have those two tables:
CREATE TABLE Student (
Name INTEGER UNSIGNED NOT NULL,
Gender ENUM('Male','Female') NOT NULL,
PRIMARY KEY(Name)
);
+--------+--------+
| Name | Gender |
+--------+--------+
| John | Male |
| Tom | Male |
| Mary | Female |
| George | Male |
| Kenny | Male |
+--------+--------+
CREATE TABLE Marks (
Name VARCHAR(50) NOT NULL,
Course VARCHAR(500) NOT NULL,
Mark INTEGER UNSIGNED NULL
PRIMARY KEY(Name, Course)
);
+--------+---------+------+
| Name | Course | Mark |
+--------+---------+------+
| John | French | 5 |
| John | Italian | 7 |
| John | Russian | 3 |
| Tom | Russian | 9 |
| Mary | French | 7 |
| Mary | Spanish | 3 |
| Mary | Italian | 9 |
| George | French | 3 |
| George | Russian | 6 |
| George | Italian | 8 |
| Kenny | French | 5 |
| Kenny | Italian | 3 |
+--------+---------+------+
How do I select the boys who passed (scored 5 or higher) the French
and the Italian course? In that case the search result is "John".
Thank you.
- 5
- bk commit into 5.0 tree (sergefp:1.1879) BUG#8397Below is the list of changes that have just been committed into a local
5.0 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1879 05/02/22 21:58:10 email***@***.com +3 -0
Fix for BUG#8397 (second commit after review):
In Item_cache_decimal::store(item) the call item->val_decimal_result()
returns NULL if the passed item has an SQL null value. Don't try copying
NULL into Item_cache_decimal::val in this case.
sql/item.cc
1.118 05/02/22 21:58:07 email***@***.com +1 -1
Fix for BUG#8397: In Item_cache_decimal::store(item) the call
item->val_decimal_result() returns NULL if the passed item has an SQL null
value. Don't try copying NULL into Item_cache_decimal::val in this case.
mysql-test/t/type_decimal.test
1.20 05/02/22 21:58:07 email***@***.com +18 -1
Test for BUG#8397
mysql-test/r/type_decimal.result
1.28 05/02/22 21:58:07 email***@***.com +17 -1
Test for BUG#8397
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sergefp
# Host: newbox.mylan
# Root: /home/psergey/mysql-5.0-bug8397
--- 1.117/sql/item.cc 2005-02-21 08:56:24 +03:00
+++ 1.118/sql/item.cc 2005-02-22 21:58:07 +03:00
@@ -4349,7 +4349,7 @@
void Item_cache_decimal::store(Item *item)
{
my_decimal *val= item->val_decimal_result(&decimal_value);
- if (val != &decimal_value)
+ if (val != &decimal_value && !item->null_value)
my_decimal2decimal(val, &decimal_value);
null_value= item->null_value;
}
--- 1.27/mysql-test/r/type_decimal.result 2005-02-19 19:58:20 +03:00
+++ 1.28/mysql-test/r/type_decimal.result 2005-02-22 21:58:07 +03:00
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2;
SET SQL_WARNINGS=1;
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
@@ -677,3 +677,19 @@
9999.999
0000.000
drop table t1;
+CREATE TABLE t1
+(EMPNUM CHAR(3) NOT NULL,
+HOURS DECIMAL(5));
+CREATE TABLE t2
+(EMPNUM CHAR(3) NOT NULL,
+HOURS BIGINT);
+INSERT INTO t1 VALUES ('E1',40);
+INSERT INTO t1 VALUES ('E8',NULL);
+INSERT INTO t2 VALUES ('E1',40);
+SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t2);
+EMPNUM
+E1
+SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t1);
+EMPNUM
+E1
+DROP TABLE t1,t2;
--- 1.19/mysql-test/t/type_decimal.test 2005-02-19 19:58:21 +03:00
+++ 1.20/mysql-test/t/type_decimal.test 2005-02-22 21:58:07 +03:00
@@ -1,7 +1,7 @@
# bug in decimal() with negative numbers by email***@***.com
--disable_warnings
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2;
--enable_warnings
SET SQL_WARNINGS=1;
@@ -268,3 +268,20 @@
--enable_warnings
select * from t1;
drop table t1;
+
+# Test for BUG#8397: decimal type in subselects (Item_cache_decimal)
+CREATE TABLE t1
+(EMPNUM CHAR(3) NOT NULL,
+HOURS DECIMAL(5));
+CREATE TABLE t2
+(EMPNUM CHAR(3) NOT NULL,
+HOURS BIGINT);
+
+INSERT INTO t1 VALUES ('E1',40);
+INSERT INTO t1 VALUES ('E8',NULL);
+INSERT INTO t2 VALUES ('E1',40);
+
+SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t2);
+SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t1);
+
+DROP TABLE t1,t2;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 5
- bk commit into 5.0 tree (konstantin:1.1786) BUG#8849Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1786 05/03/03 16:28:27 email***@***.com +11 -0
Fixes for bug#8115 "Server Crash with prepared statement"
and bug#8849 "problem with insert statement with table alias's":
make equality propagation work in stored procedures and prepared
statements.
Equality propagation can change AND/OR structure of ON expressions,
so the fix is to provide each execution of PS/SP with it's own
copy of AND/OR tree. We have been doing that already for WHERE clauses,
now ON clauses are also copied.
sql/table.h
1.90 05/03/03 16:28:22 email***@***.com +9 -0
Add declaration for TABLE::prep_on_expr.
sql/sql_select.cc
1.293 05/03/03 16:28:22 email***@***.com +26 -13
Implementation of equality propagation inspected with regard to
prepared statements and stored procedures. We now restore
AND/OR structure of every ON expression in addition to AND/OR
structure of WHERE clauses when reexecuting a PS/SP.
sql/sql_prepare.cc
1.102 05/03/03 16:28:22 email***@***.com +27 -8
Implement init_stmt_after_parse() which prepares AND/OR
structure of all ON expressions and WHERE clauses of a statement
for copying.
sql/sp_head.cc
1.117 05/03/03 16:28:22 email***@***.com +1 -0
Call init_stmt_after_parse in restore_lex(), which is used to
grab TABLE_LIST and SELECT_LEX list of a parsed substatement of
stored procedure. This is a necessary post-init step which
must be done for any statement which can be executed many times.
sql/mysql_priv.h
1.268 05/03/03 16:28:22 email***@***.com +1 -0
Add declaration for init_stmt_after_parse.
sql/item_cmpfunc.h
1.92 05/03/03 16:28:22 email***@***.com +6 -0
Comment how Item_equal works with PS/SP.
sql/item_cmpfunc.cc
1.139 05/03/03 16:28:22 email***@***.com +17 -6
Comment a parse tree transformation.
mysql-test/t/sp.test
1.106 05/03/03 16:28:22 email***@***.com +49 -0
A test case for Bug#8849 "problem with insert statement with table
alias's".
mysql-test/t/ps.test
1.33 05/03/03 16:28:21 email***@***.com +33 -0
A test case for Bug#8115 "Server Crash with prepared statement".
mysql-test/r/sp.result
1.112 05/03/03 16:28:21 email***@***.com +38 -0
Bug#8849: test results fixed.
mysql-test/r/ps.result
1.34 05/03/03 16:28:21 email***@***.com +25 -0
Bug#8115: test results fixed.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: konstantin
# Host: dragonfly.local
# Root: /media/sda1/mysql/mysql-5.0-8849
--- 1.138/sql/item_cmpfunc.cc 2005-03-02 12:41:10 +03:00
+++ 1.139/sql/item_cmpfunc.cc 2005-03-03 16:28:22 +03:00
@@ -2289,6 +2289,21 @@
if (check_stack_overrun(thd, buff))
return TRUE; // Fatal error flag is set!
+ /*
+ The following optimization reduces the depth of an AND-OR tree.
+ E.g. a WHERE clause like
+ F1 AND (F2 AND (F2 AND F4))
+ is parsed into a tree with the same nested structure as defined
+ by braces. This optimization will transform such tree into
+ AND (F1, F2, F3, F4).
+ Trees of OR items are flattened as well:
+ ((F1 OR F2) OR (F3 OR F4)) => OR (F1, F2, F3, F4)
+ Items for removed AND/OR levels will dangle until the death of the
+ entire statement.
+ The optimization is currently prepared statements and stored procedures
+ friendly as it doesn't allocate any memory and its effects are durable
+ (i.e. do not depend on PS/SP arguments).
+ */
while ((item=li++))
{
table_map tmp_table_map;
@@ -3265,6 +3280,7 @@
const_item= c;
}
+
Item_equal::Item_equal(Item_equal *item_equal)
: Item_bool_func(), eval_item(0), cond_false(0)
{
@@ -3301,12 +3317,7 @@
uint Item_equal::members()
{
- uint count= 0;
- List_iterator_fast<Item_field> li(fields);
- Item_field *item;
- while ((item= li++))
- count++;
- return count;
+ return fields.elements;
}
--- 1.91/sql/item_cmpfunc.h 2005-03-02 12:38:14 +03:00
+++ 1.92/sql/item_cmpfunc.h 2005-03-03 16:28:22 +03:00
@@ -1095,6 +1095,12 @@
predicates that can not be used to access tables in the investigated
plan for those, obtained by substitution of some fields for equal fields,
that can be used.
+
+ Prepared Statements/Stored Procedures note: instances of class
+ Item_equal are created only at the time a PS/SP is executed and
+ are deleted in the end of execution. All changes made to these
+ objects need not be registered in the list of changes of the parse
+ tree and do not harm PS/SP re-execution.
*/
class Item_equal: public Item_bool_func
--- 1.267/sql/mysql_priv.h 2005-03-02 16:39:20 +03:00
+++ 1.268/sql/mysql_priv.h 2005-03-03 16:28:22 +03:00
@@ -805,6 +805,7 @@
void mysql_stmt_reset(THD *thd, char *packet);
void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length);
void reset_stmt_for_execute(THD *thd, LEX *lex);
+void init_stmt_after_parse(THD*, LEX*);
/* sql_error.cc */
MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, uint code,
--- 1.292/sql/sql_select.cc 2005-03-01 23:19:14 +03:00
+++ 1.293/sql/sql_select.cc 2005-03-03 16:28:22 +03:00
@@ -6192,9 +6192,9 @@
For b=c it will be called with *cond_equal=(0,[Item_equal(a,b)])
and will transform *cond_equal into CE=(0,[Item_equal(a,b,c)]).
For b=2 it will be called with *cond_equal=(ptr(CE),[])
- and will transform *cond_equal into (ptr(CE,[Item_equal(2,a,b,c)]).
+ and will transform *cond_equal into (ptr(CE),[Item_equal(2,a,b,c)]).
For f=e it will be called with *cond_equal=(ptr(CE), [])
- and will transform *cond_equal into (ptr(CE,[Item_equal(f,e)]).
+ and will transform *cond_equal into (ptr(CE),[Item_equal(f,e)]).
NOTES
Now only fields that have the same type defintions (verified by
@@ -6463,6 +6463,11 @@
*/
while ((item= li++))
{
+ /*
+ PS/SP note: we can safely remove a node from AND-OR
+ structure here because it's restored before each
+ re-execution of any prepared statement/stored procedure.
+ */
if (check_equality(item, &cond_equal))
li.remove();
}
@@ -6501,6 +6506,11 @@
if ((new_item = build_equal_items_for_cond(item, inherited))!= item)
{
/* This replacement happens only for standalone equalities */
+ /*
+ This is ok with PS/SP as the replacement is done for
+ arguments of an AND/OR item, which are restored for each
+ execution of PS/SP.
+ */
li.replace(new_item);
}
}
@@ -6636,10 +6646,12 @@
Item *expr;
List<TABLE_LIST> *join_list= table->nested_join ?
&table->nested_join->join_list : NULL;
- expr= build_equal_items(thd, table->on_expr, inherited, join_list,
- &table->cond_equal);
- if (expr != table->on_expr)
- thd->change_item_tree(&table->on_expr, expr);
+ /*
+ We can modify table->on_expr because its old value will
+ be restored before re-execution of PS/SP.
+ */
+ table->on_expr= build_equal_items(thd, table->on_expr, inherited,
+ join_list, &table->cond_equal);
}
}
}
@@ -6866,10 +6878,14 @@
while ((item= li++))
{
Item *new_item =substitute_for_best_equal_field(item, cond_equal,
- table_join_idx);
+ table_join_idx);
+ /*
+ This works OK with PS/SP re-execution as changes are made to
+ the arguments of AND/OR items only
+ */
if (new_item != item)
li.replace(new_item);
- }
+ }
if (and_level)
{
@@ -7198,7 +7214,7 @@
*/
expr= simplify_joins(join, &nested_join->join_list,
table->on_expr, FALSE);
- table->on_expr= expr;
+ table->prep_on_expr= table->on_expr= expr;
}
nested_join->used_tables= (table_map) 0;
nested_join->not_null_tables=(table_map) 0;
@@ -7238,7 +7254,7 @@
}
else
conds= table->on_expr;
- table->on_expr= 0;
+ table->prep_on_expr= table->on_expr= 0;
}
}
@@ -7319,10 +7335,7 @@
DBUG_ENTER("optimize_cond");
if (!conds)
- {
*cond_value= Item::COND_TRUE;
- select->prep_where= 0;
- }
else
{
/*
--- 1.89/sql/table.h 2005-02-07 11:57:07 +03:00
+++ 1.90/sql/table.h 2005-03-03 16:28:22 +03:00
@@ -339,6 +339,15 @@
char *db, *alias, *table_name, *schema_table_name;
char *option; /* Used by cache index */
Item *on_expr; /* Used with outer join */
+ /*
+ The scturcture of ON expression presented in the member above
+ can be changed during certain optimizations. This member
+ contains a snapshot of AND-OR structure of the ON expression
+ made after permanent transformations of the parse tree, and is
+ used to restore ON clause before every reexecution of a prepared
+ statement or stored procedure.
+ */
+ Item *prep_on_expr;
COND_EQUAL *cond_equal; /* Used with outer join */
struct st_table_list *natural_join; /* natural join on this table*/
/* ... join ... USE INDEX ... IGNORE INDEX */
--- 1.111/mysql-test/r/sp.result 2005-03-02 19:25:51 +03:00
+++ 1.112/mysql-test/r/sp.result 2005-03-03 16:28:21 +03:00
@@ -2542,3 +2542,41 @@
drop table t3|
drop table t1;
drop table t2;
+CREATE TABLE t1 (
+lpitnumber int(11) default NULL,
+lrecordtype int(11) default NULL
+);
+CREATE TABLE t2 (
+lbsiid int(11) NOT NULL default '0',
+ltradingmodeid int(11) NOT NULL default '0',
+ltradingareaid int(11) NOT NULL default '0',
+csellingprice decimal(19,4) default NULL,
+PRIMARY KEY (lbsiid,ltradingmodeid,ltradingareaid)
+);
+CREATE TABLE t3 (
+lbsiid int(11) NOT NULL default '0',
+ltradingareaid int(11) NOT NULL default '0',
+PRIMARY KEY (lbsiid,ltradingareaid)
+);
+CREATE PROCEDURE bug8849()
+begin
+insert into t3
+(
+t3.lbsiid,
+t3.ltradingareaid
+)
+select distinct t1.lpitnumber, t2.ltradingareaid
+from
+t2 join t1 on
+t1.lpitnumber = t2.lbsiid
+and t1.lrecordtype = 1
+left join t2 as price01 on
+price01.lbsiid = t2.lbsiid and
+price01.ltradingmodeid = 1 and
+t2.ltradingareaid = price01.ltradingareaid;
+end|
+call bug8849();
+call bug8849();
+call bug8849();
+drop procedure bug8849;
+drop tables t1,t2,t3;
--- 1.105/mysql-test/t/sp.test 2005-03-02 19:25:51 +03:00
+++ 1.106/mysql-test/t/sp.test 2005-03-03 16:28:22 +03:00
@@ -3086,3 +3086,52 @@
drop table t1;
drop table t2;
+#
+# Bug#8849: rolling back changes to AND/OR structure of ON and WHERE clauses
+# in SP
+#
+
+CREATE TABLE t1 (
+ lpitnumber int(11) default NULL,
+ lrecordtype int(11) default NULL
+);
+
+CREATE TABLE t2 (
+ lbsiid int(11) NOT NULL default '0',
+ ltradingmodeid int(11) NOT NULL default '0',
+ ltradingareaid int(11) NOT NULL default '0',
+ csellingprice decimal(19,4) default NULL,
+ PRIMARY KEY (lbsiid,ltradingmodeid,ltradingareaid)
+);
+
+CREATE TABLE t3 (
+ lbsiid int(11) NOT NULL default '0',
+ ltradingareaid int(11) NOT NULL default '0',
+ PRIMARY KEY (lbsiid,ltradingareaid)
+);
+
+delimiter |;
+CREATE PROCEDURE bug8849()
+begin
+ insert into t3
+ (
+ t3.lbsiid,
+ t3.ltradingareaid
+ )
+ select distinct t1.lpitnumber, t2.ltradingareaid
+ from
+ t2 join t1 on
+ t1.lpitnumber = t2.lbsiid
+ and t1.lrecordtype = 1
+ left join t2 as price01 on
+ price01.lbsiid = t2.lbsiid and
+ price01.ltradingmodeid = 1 and
+ t2.ltradingareaid = price01.ltradingareaid;
+end|
+delimiter ;|
+
+call bug8849();
+call bug8849();
+call bug8849();
+drop procedure bug8849;
+drop tables t1,t2,t3;
--- 1.116/sql/sp_head.cc 2005-02-25 17:21:00 +03:00
+++ 1.117/sql/sp_head.cc 2005-03-03 16:28:22 +03:00
@@ -819,6 +819,7 @@
LEX *sublex= thd->lex;
LEX *oldlex= (LEX *)m_lex.pop();
+ init_stmt_after_parse(thd, sublex);
if (! oldlex)
return; // Nothing to restore
--- 1.33/mysql-test/r/ps.result 2005-03-03 13:29:32 +03:00
+++ 1.34/mysql-test/r/ps.result 2005-03-03 16:28:21 +03:00
@@ -499,3 +499,28 @@
FOUND_ROWS()
2
deallocate prepare stmt;
+create table t1 (a char(3) not null, b char(3) not null,
+c char(3) not null, primary key (a, b, c));
+create table t2 like t1;
+prepare stmt from
+"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
+ where t1.a=1";
+execute stmt;
+a
+execute stmt;
+a
+execute stmt;
+a
+prepare stmt from
+"select t1.a, t1.b, t1.c, t2.a, t2.b, t2.c from
+(t1 left outer join t2 on t2.a=? and t1.b=t2.b)
+left outer join t2 t3 on t3.a=? where t1.a=?";
+set @a:=1, @b:=1, @c:=1;
+execute stmt using @a, @b, @c;
+a b c a b c
+execute stmt using @a, @b, @c;
+a b c a b c
+execute stmt using @a, @b, @c;
+a b c a b c
+deallocate prepare stmt;
+drop table t1,t2;
--- 1.32/mysql-test/t/ps.test 2005-03-03 13:29:32 +03:00
+++ 1.33/mysql-test/t/ps.test 2005-03-03 16:28:21 +03:00
@@ -507,3 +507,36 @@
execute stmt;
SELECT FOUND_ROWS();
deallocate prepare stmt;
+
+#
+# Bug#8115: equality propagation and prepared statements
+#
+
+create table t1 (a char(3) not null, b char(3) not null,
+ c char(3) not null, primary key (a, b, c));
+create table t2 like t1;
+
+# reduced query
+prepare stmt from
+ "select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
+ where t1.a=1";
+execute stmt;
+execute stmt;
+execute stmt;
+
+# original query
+prepare stmt from
+"select t1.a, t1.b, t1.c, t2.a, t2.b, t2.c from
+(t1 left outer join t2 on t2.a=? and t1.b=t2.b)
+left outer join t2 t3 on t3.a=? where t1.a=?";
+
+set @a:=1, @b:=1, @c:=1;
+
+execute stmt using @a, @b, @c;
+execute stmt using @a, @b, @c;
+execute stmt using @a, @b, @c;
+
+deallocate prepare stmt;
+
+drop table t1,t2;
+
--- 1.101/sql/sql_prepare.cc 2005-02-25 17:53:16 +03:00
+++ 1.102/sql/sql_prepare.cc 2005-03-03 16:28:22 +03:00
@@ -1809,20 +1809,33 @@
else
{
stmt->setup_set_params();
- SELECT_LEX *sl= stmt->lex->all_selects_list;
- /*
- Save WHERE clause pointers, because they may be changed during query
- optimisation.
- */
- for (; sl; sl= sl->next_select_in_list())
- sl->prep_where= sl->where;
+ init_stmt_after_parse(thd, stmt->lex);
stmt->state= Item_arena::PREPARED;
}
DBUG_RETURN(!stmt);
}
-/* Reinit statement before execution */
+/*
+ Init PS/SP specific parse tree members.
+*/
+
+void init_stmt_after_parse(THD *thd, LEX *lex)
+{
+ SELECT_LEX *sl= lex->all_selects_list;
+ /*
+ Save WHERE clause pointers, because they may be changed during query
+ optimisation.
+ */
+ for (; sl; sl= sl->next_select_in_list())
+ sl->prep_where= sl->where;
+
+ for (TABLE_LIST *table= lex->query_tables; table; table= table->next_global)
+ table->prep_on_expr= table->on_expr;
+}
+
+
+/* Reinit prepared statement/stored procedure before execution */
void reset_stmt_for_execute(THD *thd, LEX *lex)
{
@@ -1883,6 +1896,12 @@
tables->table= 0;
if (tables->nested_join)
tables->nested_join->counter= 0;
+
+ if (tables->prep_on_expr)
+ {
+ tables->on_expr= tables->prep_on_expr->copy_andor_structure(thd);
+ tables->on_expr->cleanup();
+ }
}
lex->current_select= &lex->select_lex;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 7
- problems with mysql thru command line"karl james" <email***@***.com> wrote:
> Im kinda new at creating databases thru the command line
> When I try to login using.
> Mysql -h hostname -username -p
>
> I get this message on command line.
>
> C:\Documents and Settings\Karl James>mysql -h hostname -u username -p
> -p;
> 'mysql' is not a recognized as a internal or exteranl command,
> operable program or batch file.
>
> Am I in the wrong section on my computer, what am I doing wrong
> Im trying to follow examples in book, but its not working right with me.
Run it from MySQL /bin directory.
--
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***@***.com
/_/ /_/\_, /___/\___\_\___/ 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/mysql?unsub=email***@***.com
- 7
- bk commit into 5.0 tree (kent:1.1970)Below is the list of changes that have just been committed into a local
5.0 repository of kent. When kent does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1970 05/06/21 02:27:55 email***@***.com +1 -0
Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
mysql-test/mysql-test-run.pl
1.32 05/06/21 02:27:49 email***@***.com +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: kent
# Host: g4.boortz.dyndns.org
# Root: /Users/kent/mysql/bk/mysql-5.0/RESYNC
--- 1.31/mysql-test/mysql-test-run.pl 2005-06-20 22:28:16 +02:00
+++ 1.32/mysql-test/mysql-test-run.pl 2005-06-21 02:27:49 +02:00
@@ -770,146 +770,83 @@
if ( $opt_source_dist )
{
- if ( $glob_use_embedded_server )
+ if ( $glob_win32 )
{
- if ( -f "$glob_basedir/libmysqld/examples/mysqltest" )
- {
- $exe_mysqltest= "$glob_basedir/libmysqld/examples/mysqltest";
- }
- else
- {
- mtr_error("Can't find embedded server 'mysqltest'");
- }
- $exe_mysql_client_test=
- "$glob_basedir/libmysqld/examples/mysql_client_test_embedded";
+ $path_client_bindir= mtr_path_exists("$glob_basedir/client_release");
+ $exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-nt");
+ $path_language= mtr_path_exists("$glob_basedir/share/english/");
+ $path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets");
}
else
{
- if ( -f "$glob_basedir/client/.libs/lt-mysqltest" )
- {
- $exe_mysqltest= "$glob_basedir/client/.libs/lt-mysqltest";
- }
- elsif ( -f "$glob_basedir/client/.libs/mysqltest" )
- {
- $exe_mysqltest= "$glob_basedir/client/.libs/mysqltest";
- }
- else
- {
- $exe_mysqltest= "$glob_basedir/client/mysqltest";
- }
- $exe_mysql_client_test=
- "$glob_basedir/tests/mysql_client_test";
- }
- if ( -f "$glob_basedir/client/.libs/mysqldump" )
- {
- $exe_mysqldump= "$glob_basedir/client/.libs/mysqldump";
+ $path_client_bindir= mtr_path_exists("$glob_basedir/client");
+ $exe_mysqld= mtr_exe_exists ("$glob_basedir/sql/mysqld");
+ $path_language= mtr_path_exists("$glob_basedir/sql/share/english/");
+ $path_charsetsdir= mtr_path_exists("$glob_basedir/sql/share/charsets");
}
- else
- {
- $exe_mysqldump= "$glob_basedir/client/mysqldump";
- }
- if ( -f "$glob_basedir/client/.libs/mysqlshow" )
- {
- $exe_mysqlshow= "$glob_basedir/client/.libs/mysqlshow";
- }
- else
- {
- $exe_mysqlshow= "$glob_basedir/client/mysqlshow";
- }
- if ( -f "$glob_basedir/client/.libs/mysqlbinlog" )
+
+ if ( $glob_use_embedded_server )
{
- $exe_mysqlbinlog= "$glob_basedir/client/.libs/mysqlbinlog";
+ my $path_examples= "$glob_basedir/libmysqld/examples";
+ $exe_mysqltest= mtr_exe_exists("$path_examples/mysqltest");
+ $exe_mysql_client_test=
+ mtr_exe_exists("$path_examples/mysql_client_test_embedded");
}
else
{
- $exe_mysqlbinlog= "$glob_basedir/client/mysqlbinlog";
+ $exe_mysqltest= mtr_exe_exists("$glob_basedir/client/mysqltest");
+ $exe_mysql_client_test=
+ mtr_exe_exists("$glob_basedir/tests/mysql_client_test");
}
-
- $path_client_bindir= "$glob_basedir/client";
- $exe_mysqld= "$glob_basedir/sql/mysqld";
- $exe_mysqladmin= "$path_client_bindir/mysqladmin";
- $exe_mysql= "$path_client_bindir/mysql";
- $exe_mysql_fix_system_tables= "$glob_basedir/scripts/mysql_fix_privilege_tables";
- $path_language= "$glob_basedir/sql/share/english/";
- $path_charsetsdir= "$glob_basedir/sql/share/charsets";
-
- $path_ndb_tools_dir= "$glob_basedir/ndb/tools";
- $exe_ndb_mgm= "$glob_basedir/ndb/src/mgmclient/ndb_mgm";
+ $exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
+ $exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
+ $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
+ $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
+ $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
+ $exe_mysql_fix_system_tables=
+ mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables");
+ $path_ndb_tools_dir= mtr_path_exists("$glob_basedir/ndb/tools");
+ $exe_ndb_mgm= "$glob_basedir/ndb/src/mgmclient/ndb_mgm";
}
else
{
- my $path_tests_bindir= "$glob_basedir/tests";
-
- $path_client_bindir= "$glob_basedir/bin";
- $exe_mysqltest= "$path_client_bindir/mysqltest";
- $exe_mysqldump= "$path_client_bindir/mysqldump";
- $exe_mysqlshow= "$path_client_bindir/mysqlshow";
- $exe_mysqlbinlog= "$path_client_bindir/mysqlbinlog";
- $exe_mysqladmin= "$path_client_bindir/mysqladmin";
- $exe_mysql= "$path_client_bindir/mysql";
- $exe_mysql_fix_system_tables= "$path_client_bindir/mysql_fix_privilege_tables";
-
- if ( -d "$glob_basedir/share/mysql/english" )
- {
- $path_language ="$glob_basedir/share/mysql/english/";
- $path_charsetsdir ="$glob_basedir/share/mysql/charsets";
- }
- else
- {
- $path_language ="$glob_basedir/share/english/";
- $path_charsetsdir ="$glob_basedir/share/charsets";
- }
-
- if ( -x "$glob_basedir/libexec/mysqld" )
- {
- $exe_mysqld= "$glob_basedir/libexec/mysqld";
- }
- else
- {
- $exe_mysqld= "$glob_basedir/bin/mysqld";
- }
+ $path_client_bindir= mtr_path_exists("$glob_basedir/bin");
+ $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
+ $exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
+ $exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
+ $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
+ $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
+ $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
+ $exe_mysql_fix_system_tables=
+ mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables");
+
+ $path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
+ "$glob_basedir/share/english/");
+ $path_charsetsdir= mtr_path_exists("$glob_basedir/share/mysql/charsets",
+ "$glob_basedir/share/charsets");
+ $exe_mysqld= mtr_exe_exists ("$glob_basedir/libexec/mysqld",
+ "$glob_basedir/bin/mysqld");
if ( $glob_use_embedded_server )
{
- if ( -f "$path_client_bindir/mysqltest_embedded" )
- {
- # FIXME valgrind?
- $exe_mysqltest="$path_client_bindir/mysqltest_embedded";
- }
- else
- {
- mtr_error("Cannot find embedded server 'mysqltest_embedded'");
- }
- if ( -d "$path_tests_bindir/mysql_client_test_embedded" )
- {
- $exe_mysql_client_test=
- "$path_tests_bindir/mysql_client_test_embedded";
- }
- else
- {
- $exe_mysql_client_test=
- "$path_client_bindir/mysql_client_test_embedded";
- }
+ $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest_embedded");
+ $exe_mysql_client_test=
+ mtr_exe_exists("$glob_basedir/tests/mysql_client_test_embedded",
+ "$path_client_bindir/mysql_client_test_embedded");
}
else
{
- $exe_mysqltest="$path_client_bindir/mysqltest";
- $exe_mysql_client_test="$path_client_bindir/mysql_client_test";
+ $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
+ $exe_mysql_client_test=
+ mtr_exe_exists("$path_client_bindir/mysql_client_test");
}
$path_ndb_tools_dir= "$glob_basedir/bin";
$exe_ndb_mgm= "$glob_basedir/bin/ndb_mgm";
}
- if ( ! $exe_master_mysqld )
- {
- $exe_master_mysqld= $exe_mysqld;
- }
-
- if ( ! $exe_slave_mysqld )
- {
- $exe_slave_mysqld= $exe_mysqld;
- }
+ $exe_master_mysqld= $exe_master_mysqld || $exe_mysqld;
+ $exe_slave_mysqld= $exe_slave_mysqld || $exe_mysqld;
$path_ndb_backup_dir=
"$opt_vardir/ndbcluster-$opt_ndbcluster_port";
@@ -928,15 +865,19 @@
sub environment_setup () {
# --------------------------------------------------------------------------
- # Set LD_LIBRARY_PATH if we are using shared libraries
+ # We might not use a standard installation directory, like /usr/lib.
+ # Set LD_LIBRARY_PATH to make sure we find our installed libraries.
# --------------------------------------------------------------------------
- $ENV{'LD_LIBRARY_PATH'}=
- "$glob_basedir/lib:$glob_basedir/libmysql/.libs" .
- ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : "");
- $ENV{'DYLD_LIBRARY_PATH'}=
- "$glob_basedir/lib:$glob_basedir/libmysql/.libs" .
- ($ENV{'DYLD_LIBRARY_PATH'} ? ":$ENV{'DYLD_LIBRARY_PATH'}" : "");
+ unless ( $opt_source_dist )
+ {
+ $ENV{'LD_LIBRARY_PATH'}=
+ "$glob_basedir/lib" .
+ ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : "");
+ $ENV{'DYLD_LIBRARY_PATH'}=
+ "$glob_basedir/lib" .
+ ($ENV{'DYLD_LIBRARY_PATH'} ? ":$ENV{'DYLD_LIBRARY_PATH'}" : "");
+ }
# --------------------------------------------------------------------------
# Also command lines in .opt files may contain env vars
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 7
- bk commit into 5.0 tree (monty:1.1883)Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1883 05/04/27 17:16:08 email***@***.com +4 -0
mysqladmin extended-status now displays global status
Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part
tests/mysql_client_test.c
1.112 05/04/27 17:16:05 email***@***.com +4 -3
Portability fixes
sql/handler.cc
1.160 05/04/27 17:16:04 email***@***.com +4 -3
Indentation fix
myisam/mi_key.c
1.39 05/04/27 17:16:04 email***@***.com +3 -0
Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part
(Ramil will soon push test cases)
client/mysqladmin.cc
1.107 05/04/27 17:16:04 email***@***.com +1 -1
Show GLOBAL status
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: narttu.mysql.com
# Root: /home/my/mysql-5.0
--- 1.106/client/mysqladmin.cc 2005-02-02 22:50:28 +02:00
+++ 1.107/client/mysqladmin.cc 2005-04-27 17:16:04 +03:00
@@ -727,7 +727,7 @@
void (*func) (MYSQL_RES*, MYSQL_ROW, uint);
new_line = 1;
- if (mysql_query(mysql, "show status") ||
+ if (mysql_query(mysql, "show /*!50002 GLOBAL */ status") ||
!(res = mysql_store_result(mysql)))
{
my_printf_error(0, "unable to show status; error: '%s'", MYF(ME_BELL),
--- 1.38/myisam/mi_key.c 2005-02-25 16:53:15 +02:00
+++ 1.39/myisam/mi_key.c 2005-04-27 17:16:04 +03:00
@@ -242,7 +242,10 @@
{
k_length-=length;
if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
+ {
k_length-=2; /* Skip length */
+ old+= 2;
+ }
continue; /* Found NULL */
}
}
--- 1.159/sql/handler.cc 2005-04-07 21:19:23 +03:00
+++ 1.160/sql/handler.cc 2005-04-27 17:16:04 +03:00
@@ -175,9 +175,10 @@
return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ?
(enum db_type) thd->variables.table_type :
- (enum db_type) global_system_variables.table_type !=
- DB_TYPE_UNKNOWN ?
- (enum db_type) global_system_variables.table_type : DB_TYPE_MYISAM);
+ ((enum db_type) global_system_variables.table_type !=
+ DB_TYPE_UNKNOWN ?
+ (enum db_type) global_system_variables.table_type : DB_TYPE_MYISAM)
+ );
} /* ha_checktype */
--- 1.111/tests/mysql_client_test.c 2005-04-04 16:43:20 +03:00
+++ 1.112/tests/mysql_client_test.c 2005-04-27 17:16:05 +03:00
@@ -7046,6 +7046,7 @@
bug #89 (reported by email***@***.com)
*/
+#ifndef EMBEDDED_LIBRARY
static void test_prepare_grant()
{
int rc;
@@ -7138,7 +7139,7 @@
}
}
-
+#endif
/*
Test a crash when invalid/corrupted .frm is used in the
@@ -12598,7 +12599,7 @@
const char *stmt_text;
MYSQL_STMT *stmt[2];
int i, rc;
- char *query= "select a,b from t1 where a=?";
+ const char *query= "select a,b from t1 where a=?";
MYSQL_BIND bind[2];
long lval[2];
@@ -12789,7 +12790,7 @@
}
-MYSQL_STMT *open_cursor(char *query)
+MYSQL_STMT *open_cursor(const char *query)
{
int rc;
const ulong type= (ulong)CURSOR_TYPE_READ_ONLY;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 8
- limiting amount of returned rows?Hi!
How do I limit the amount of returned rows?
Lets say, that I want only the latest 400 rows (of e.g. 4034634 rows) -
is there a parameter for that like rownum in Oracle?
e.g. select * from someplace where rownum < 400 order by sometimefield?
BR
Sonnich
- 8
- How to query date between?I have table name "actionlog",and one field in there is "date_time"
date_time (Type:datetime) example value : 11/1/2006 11:05:07
if I'd like to query date between 24/07/2006 to 26/07/2006(I don't
need time),how to write SQL command?
select * from actionlog where date_time > 24/07/2006 AND date_time <
24/07/2006 ??
- 11
- Interesting SQL query requirement for <SELECT> menuHi All
Wondered if you could help me with the below query.
I have 1 simple table called STOCKCATS that consists of 2 fields.
These fields are called CATID and LEVEL.
The contents of this table are as follows:
CATID LEVEL
cat01 <nothing>
cat02 <nothing>
cat03 cat01
cat04 <nothing>
cat05 cat01
cat06 cat02
cat07 cat04
etc.. etc...
The way this table works is that I have an ASP page that allows the user to
create a stock category at 2 levels, category level and sub-category level.
When I file the entered data into the table, if the user has chosen to
create a category level stock category then the LEVEL field is left blank
and if they chose to create a sub-category level category then I post the
relevant category level stock category code in the LEVEL field. For
example, in the above list cat01 is a category level stock category and
cat05 is a sub-category as it is a sub-category of cat01.
My query is that I want to populate a simple HTML <SELECT> menu (using ASP),
but instead of it being a straightforward 'select catid from stockcats order
by catid', I want to group this list into some kind of order, eg:
instead of:
cat01 <nothing> << I need to bring back this 2nd column so that I can
do a simple IF THEN in asp to indent sub-cats
cat02 <nothing>
cat03 cat01
cat04 <nothing>
cat05 cat01
cat06 cat02
cat07 cat04
I would like
cat01 <nothing> << ditto
cat03 cat01
cat05 cat01
cat02 <nothing>
cat06 cat02
cat04 <nothing>
cat07 cat04
Do you know if this is possible in pure SQL (I must confess that I'm using
MySQL, but I would have thought the SQL syntax would be the same if it is
possible) or a combo of ASP & SQL?
Thanks
Robbie
- 12
- Problems trying to get MySQL to work from PHP scriptI'm having trouble getting a new PHP/MySQl installation to work.
Windows XP Pro, IIS 5.1, PHP 5.1.1, MySQL 5.0.16, ISAPI
This is a new computer. The whole setup is for development use only -
no access from beyond my own network.
PHP seems to be working OK. I can open a test.php page ok - It
executes down to the statement where I try to connect to the MySQL
database. At that point, nothing further happens. The page is served
out. No errors are generated.
MySQL also seems to be working. I've installed MySQL Administrator
and, from what I can see, everything looks OK. I have a database - it
has tables in it - the tables have data in them - I can execute
queries against them. This database is a copy of one I developed on
another machine
FWIW, the MySQL extension is activated in the PHP.INI file thus:
extension=php_mysql.dll
Here's the beginning of the script in the test.php page:
--------------------------------------------------
Here we go!
<?php
echo("<br>Inside the php script!");
$conn=@mysql_connect( "localhost", "root", "admin" );
echo("<br>Connected to the database!");
$rs = @mysql_select_db( "crowdwisdom", $conn );
---------------------------------------------------
When this runs, the displayed page consists of:
Here we go!
Inside the php script!
Help?
- 16
- log files and upgradingIs it possible to log information to the general log file only for a specific database?
We are currently running MySQL 4.0.15. We are planning on moving to a new server so and will upgrade MySQL. What is the latest most stable version that is recommended?
Thanks for any information.
--
Malka Cymbalista
Webmaster, Weizmann Institute of Science
email***@***.com
08-934-3036
- 16
- Access denied problemHi
I can't figure out how to access a Mysql database from a Java programm. I
always get SQLException access denied for user @computer_name. The server
(mysqld) runs on localhost (127.0.0.1) and is accessed by a local user (local
user executes java). Executing:
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON yourdb_name.* TO
dbuser@localhost IDENTIFIED BY 'dbpassword';
hasn't helped either. What am I doing wrong? I would be grateful, if someone
could explain all steps.
Thanks!
My System:
Debian (woody/backports),
mysqld Ver. 4.0.18,
java 1.4.2_04,
put mysql-connector-java-3.0.11-stable-bin.jar into
/usr/lib/j2sdk1.4-sun/jre/lib/ext/,
removed the skip-networking in /etc/mysql/my
--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?unsub=email***@***.com
- 16
- bk commit into 5.0 tree (msvensson:1.2010)Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2010 05/10/04 14:42:02 msvensson@neptunus.(none) +1 -0
Move -ansi from global_warnings to cxx_warnings
BUILD/SETUP.sh
1.51 05/10/04 14:41:56 msvensson@neptunus.(none) +2 -2
Move -ansi from global_warnings to cxx_warnings
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/mysql-5.0
--- 1.50/BUILD/SETUP.sh 2005-09-30 16:36:58 +02:00
+++ 1.51/BUILD/SETUP.sh 2005-10-04 14:41:56 +02:00
@@ -48,10 +48,10 @@
# The following warning flag will give too many warnings:
# -Wshadow -Wunused -Winline (The later isn't usable in C++ as
# __attribute()__ doesn't work with gnu C++)
-global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -ansi"
+global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings"
#debug_extra_warnings="-Wuninitialized"
c_warnings="$global_warnings -Wunused"
-cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
+cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -ansi"
base_max_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-openssl --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine"
base_max_no_ndb_configs="--with-innodb --with-berkeley-db --without-ndbcluster --with-archive-storage-engine --with-openssl --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine"
max_leave_isam_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-federated-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-openssl --with-embedded-server --with-big-tables"
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 16
- bk commit into 4.0 tree (kp:1.2158)Below is the list of changes that have just been committed into a local
4.0 repository of kp. When kp does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2158 05/11/16 12:05:12 email***@***.com[kp] +1 -0
force_kill_connection.patch
sql/sql_parse.cc
1.394 05/10/19 16:54:16 email***@***.com[kp] +3 -0
Import patch force_kill_connection.patch
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: kp
# Host: blr-techserv.blr.novell.com
# Root: /home/kp/blr-engrlinux/bk/new/Sawtooth_SP2
--- 1.393/sql/sql_parse.cc 2005-05-31 14:38:12 +05:30
+++ 1.394/sql/sql_parse.cc 2005-10-19 16:54:16 +05:30
@@ -3892,6 +3892,9 @@
!strcmp(thd->user,tmp->user))
{
tmp->awake(1 /*prepare to die*/);
+ #ifdef __NETWARE__
+ close_connection(&tmp->net);
+ #endif
error=0;
}
else
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
|
| Author |
Message |
jimw

|
Posted: 2005-3-5 2:52:46 |
Top |
mysql, bk commit into 5.0 tree (jimw:1.1797)
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.1797 05/03/04 10:55:14 email***@***.com +3 -0
Merge
mysql-test/t/sql_mode.test
1.10 05/03/04 10:55:13 email***@***.com +0 -0
SCCS merged
mysql-test/r/sql_mode.result
1.19 05/03/04 10:55:13 email***@***.com +0 -0
SCCS merged
sql/sql_show.cc
1.222 05/03/04 10:41:44 email***@***.com +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-5.0-6903/RESYNC
--- 1.221/sql/sql_show.cc 2005-03-03 08:20:09 -08:00
+++ 1.222/sql/sql_show.cc 2005-03-04 10:41:44 -08:00
@@ -1048,7 +1048,13 @@
buff->append('.');
append_identifier(thd, buff, table->view_name.str, table->view_name.length);
buff->append(" AS ", 4);
- buff->append(table->query.str, table->query.length);
+
+ /*
+ We can't just use table->query, because our SQL_MODE may trigger
+ a different syntax, like when ANSI_QUOTES is defined.
+ */
+ table->view->unit.print(buff);
+
if (table->with_check != VIEW_CHECK_NONE)
{
if (table->with_check == VIEW_CHECK_LOCAL)
--- 1.18/mysql-test/r/sql_mode.result 2005-02-03 16:11:38 -08:00
+++ 1.19/mysql-test/r/sql_mode.result 2005-03-04 10:55:13 -08:00
@@ -386,6 +386,41 @@
20 \\\\% \\\\%
20 \\\\% \\\\_
DROP TABLE t1;
+SET @@SQL_MODE='';
+create function `foo` () returns int return 5;
+show create function `foo`;
+Function sql_mode Create Function
+foo CREATE FUNCTION `test`.`foo`() RETURNS int
+return 5
+SET @@SQL_MODE='ANSI_QUOTES';
+show create function `foo`;
+Function sql_mode Create Function
+foo CREATE FUNCTION `test`.`foo`() RETURNS int
+return 5
+drop function `foo`;
+create function `foo` () returns int return 5;
+show create function `foo`;
+Function sql_mode Create Function
+foo ANSI_QUOTES CREATE FUNCTION "test"."foo"() RETURNS int
+return 5
+SET @@SQL_MODE='';
+show create function `foo`;
+Function sql_mode Create Function
+foo ANSI_QUOTES CREATE FUNCTION "test"."foo"() RETURNS int
+return 5
+drop function `foo`;
+SET @@SQL_MODE='';
+create table t1 (i int);
+create view v1 as select * from t1;
+show create view v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`i` AS `i` from `test`.`t1`
+SET @@SQL_MODE='ANSI_QUOTES';
+show create view v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED VIEW "test"."v1" AS select "test"."t1"."i" AS "i" from "test"."t1"
+drop view v1;
+drop table t1;
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
a\\b a\\\"b a'\\b a'\\\"b
--- 1.9/mysql-test/t/sql_mode.test 2005-02-03 15:41:36 -08:00
+++ 1.10/mysql-test/t/sql_mode.test 2005-03-04 10:55:13 -08:00
@@ -174,6 +174,31 @@
DROP TABLE t1;
+# ANSI_QUOTES does not come into play with SHOW CREATE FUNCTION or PROCEDURE
+# because it displays the SQL_MODE used to create the routine.
+SET @@SQL_MODE='';
+create function `foo` () returns int return 5;
+show create function `foo`;
+SET @@SQL_MODE='ANSI_QUOTES';
+show create function `foo`;
+drop function `foo`;
+
+create function `foo` () returns int return 5;
+show create function `foo`;
+SET @@SQL_MODE='';
+show create function `foo`;
+drop function `foo`;
+
+# ANSI_QUOTES should have effect for SHOW CREATE VIEW (Bug #6903)
+SET @@SQL_MODE='';
+create table t1 (i int);
+create view v1 as select * from t1;
+show create view v1;
+SET @@SQL_MODE='ANSI_QUOTES';
+show create view v1;
+drop view v1;
+drop table t1;
+
# Bug #6368: Make sure backslashes mixed with doubled quotes are handled
# correctly in NO_BACKSLASH_ESCAPES mode
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
@@ -185,3 +210,4 @@
SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
SET @@SQL_MODE=@OLD_SQL_MODE;
+
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
|
| |
|
| |
 |
| |
 |
Index ‹ mysql |
- Next
- 1
- bk commit into 5.0 tree (ingo:1.1919) BUG#8321Below is the list of changes that have just been committed into a local
5.0 repository of mydev. When mydev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1919 05/04/29 20:27:26 email***@***.com +1 -0
Bug#8321 - myisampack bug in compression algorithm
This is the second version of the third of three changesets.
It does not contain the bug fix, but is built on top of it.
The bug revealed that a data amount of less than 3GB could require
Huffman codes of 32 bits in length. So we can expect even longer
codes in the near to mid future. Therefore we should use 64-bit types
to store the Huffman codes. This changeset suggests that change.
myisam/myisampack.c
1.42 05/04/29 20:26:18 email***@***.com +55 -64
Bug#8321 - myisampack bug in compression algorithm
This is the second version of the third of three changesets.
It does not contain the bug fix, but is built on top of it.
The bug revealed that a data amount of less than 3GB could require
Huffman codes of 32 bits in length. So we can expect even longer
codes in the near to mid future. Therefore we should use 64-bit types
to store the Huffman codes. This changeset suggests that change.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ingo
# Host: chilla.local
# Root: /home/mydev/mysql-5.0-bug8321
--- 1.41/myisam/myisampack.c Thu Apr 28 19:33:59 2005
+++ 1.42/myisam/myisampack.c Fri Apr 29 20:26:18 2005
@@ -33,10 +33,10 @@
#include <my_getopt.h>
#include <assert.h>
-#if INT_MAX > 32767
-#define BITS_SAVED 32
+#if SIZEOF_LONG_LONG > 4
+#define BITS_SAVED 64
#else
-#define BITS_SAVED 16
+#define BITS_SAVED 32
#endif
#define IS_OFFSET ((uint) 32768) /* Bit if offset or char in tree */
@@ -52,7 +52,7 @@
char *buffer,*pos,*end;
my_off_t pos_in_file;
int bits;
- uint current_byte;
+ ulonglong bitbucket;
};
struct st_huff_tree;
@@ -98,7 +98,7 @@
my_off_t bytes_packed;
uint tree_pack_length;
uint min_chr,max_chr,char_bits,offset_bits,max_offset,height;
- ulong *code;
+ ulonglong *code;
uchar *code_len;
} HUFF_TREE;
@@ -146,7 +146,7 @@
static int make_huff_decode_table(HUFF_TREE *huff_tree,uint trees);
static void make_traverse_code_tree(HUFF_TREE *huff_tree,
HUFF_ELEMENT *element,uint size,
- ulong code);
+ ulonglong code);
static int write_header(PACK_MRG_INFO *isam_file, uint header_length,uint trees,
my_off_t tot_elements,my_off_t filelength);
static void write_field_info(HUFF_COUNTS *counts, uint fields,uint trees);
@@ -161,7 +161,7 @@
static void init_file_buffer(File file,pbool read_buffer);
static int flush_buffer(ulong neaded_length);
static void end_file_buffer(void);
-static void write_bits(ulong value,uint bits);
+static void write_bits(ulonglong value, uint bits);
static void flush_bits(void);
static int save_state(MI_INFO *isam_file,PACK_MRG_INFO *mrg,my_off_t new_length,
ha_checksum crc);
@@ -1434,12 +1434,13 @@
{
elements=huff_tree->counts->tree_buff ? huff_tree->elements : 256;
if (!(huff_tree->code =
- (ulong*) my_malloc(elements*
- (sizeof(ulong)+sizeof(uchar)),
- MYF(MY_WME | MY_ZEROFILL))))
+ (ulonglong*) my_malloc(elements*
+ (sizeof(ulonglong) + sizeof(uchar)),
+ MYF(MY_WME | MY_ZEROFILL))))
return 1;
huff_tree->code_len=(uchar*) (huff_tree->code+elements);
- make_traverse_code_tree(huff_tree,huff_tree->root,32,0);
+ make_traverse_code_tree(huff_tree, huff_tree->root,
+ 8 * sizeof(ulonglong), LL(0));
}
}
return 0;
@@ -1448,23 +1449,23 @@
static void make_traverse_code_tree(HUFF_TREE *huff_tree,
HUFF_ELEMENT *element,
- uint size, ulong code)
+ uint size, ulonglong code)
{
uint chr;
if (!element->a.leaf.null)
{
chr=element->a.leaf.element_nr;
- huff_tree->code_len[chr]=(uchar) (32-size);
- huff_tree->code[chr]= (code >> size);
- if (huff_tree->height < 32-size)
- huff_tree->height= 32-size;
+ huff_tree->code_len[chr]= (uchar) (8 * sizeof(ulonglong) - size);
+ huff_tree->code[chr]= (code >> size);
+ if (huff_tree->height < 8 * sizeof(ulonglong) - size)
+ huff_tree->height= 8 * sizeof(ulonglong) - size;
}
else
{
size--;
make_traverse_code_tree(huff_tree,element->a.nod.left,size,code);
- make_traverse_code_tree(huff_tree,element->a.nod.right,size,
- code+((ulong) 1L << size));
+ make_traverse_code_tree(huff_tree, element->a.nod.right, size,
+ code + (((ulonglong) 1) << size));
}
return;
}
@@ -1505,13 +1506,13 @@
for (i=0 ; i++ < fields ; counts++)
{
- write_bits((ulong) (int) counts->field_type,5);
+ write_bits((ulonglong) (int) counts->field_type, 5);
write_bits(counts->pack_type,6);
if (counts->pack_type & PACK_TYPE_ZERO_FILL)
write_bits(counts->max_zero_fill,5);
else
write_bits(counts->length_bits,5);
- write_bits((ulong) counts->tree->tree_number-1,huff_tree_bits);
+ write_bits((ulonglong) counts->tree->tree_number - 1, huff_tree_bits);
}
flush_bits();
return;
@@ -1598,7 +1599,7 @@
if (huff_tree->counts->tree_buff)
{
for (i=0 ; i < int_length ; i++)
- write_bits((uint) (uchar) huff_tree->counts->tree_buff[i],8);
+ write_bits((ulonglong) (uchar) huff_tree->counts->tree_buff[i], 8);
}
flush_bits();
}
@@ -1687,7 +1688,7 @@
(huff_counts[i].field_length - huff_counts[i].max_zero_fill)*
huff_counts[i].tree->height+huff_counts[i].length_bits;
}
- max_calc_length/=8;
+ max_calc_length= (max_calc_length + 7) / 8;
if (max_calc_length < 254)
pack_ref_length=1;
else if (max_calc_length <= 65535)
@@ -1753,7 +1754,7 @@
break;
case FIELD_SKIP_ENDSPACE:
for (pos=end_pos ; pos > start_pos && pos[-1] == ' ' ; pos--) ;
- length=(uint) (end_pos-pos);
+ length= (ulong) (end_pos - pos);
if (count->pack_type & PACK_TYPE_SELECTED)
{
if (length > count->min_space)
@@ -1776,7 +1777,7 @@
break;
case FIELD_SKIP_PRESPACE:
for (pos=start_pos ; pos < end_pos && pos[0] == ' ' ; pos++) ;
- length=(uint) (pos-start_pos);
+ length= (ulong) (pos - start_pos);
if (count->pack_type & PACK_TYPE_SELECTED)
{
if (length > count->min_space)
@@ -1929,7 +1930,7 @@
file_buffer.pos=file_buffer.buffer;
file_buffer.bits=BITS_SAVED;
}
- file_buffer.current_byte=0;
+ file_buffer.bitbucket= 0;
}
@@ -1987,68 +1988,58 @@
/* output `bits` low bits of `value' */
-static void write_bits (register ulong value, register uint bits)
+static void write_bits(register ulonglong value, register uint bits)
{
- if ((file_buffer.bits-=(int) bits) >= 0)
+ DBUG_ASSERT(((bits < 8 * sizeof(value)) && ! (value >> bits)) ||
+ (bits == 8 * sizeof(value)));
+ if ((file_buffer.bits-= (int) bits) >= 0)
{
- file_buffer.current_byte|=value << file_buffer.bits;
+ file_buffer.bitbucket|= value << file_buffer.bits;
}
else
{
- reg3 uint byte_buff;
+ reg3 ulonglong bit_buffer;
bits= (uint) -file_buffer.bits;
- DBUG_ASSERT(bits <= 8 * sizeof(value));
- byte_buff= (file_buffer.current_byte |
- ((bits != 8 * sizeof(value)) ? (uint) (value >> bits) : 0));
-#if BITS_SAVED == 32
- *file_buffer.pos++= (byte) (byte_buff >> 24) ;
- *file_buffer.pos++= (byte) (byte_buff >> 16) ;
+ bit_buffer= (file_buffer.bitbucket |
+ ((bits != 8 * sizeof(value)) ? (uint) (value >> bits) : 0));
+#if BITS_SAVED == 64
+ *file_buffer.pos++= (byte) (bit_buffer >> 56);
+ *file_buffer.pos++= (byte) (bit_buffer >> 48);
+ *file_buffer.pos++= (byte) (bit_buffer >> 40);
+ *file_buffer.pos++= (byte) (bit_buffer >> 32);
#endif
- *file_buffer.pos++= (byte) (byte_buff >> 8) ;
- *file_buffer.pos++= (byte) byte_buff;
+ *file_buffer.pos++= (byte) (bit_buffer >> 24) ;
+ *file_buffer.pos++= (byte) (bit_buffer >> 16) ;
+ *file_buffer.pos++= (byte) (bit_buffer >> 8) ;
+ *file_buffer.pos++= (byte) bit_buffer;
- DBUG_ASSERT(bits <= 8 * sizeof(ulong));
if (bits != 8 * sizeof(value))
- value&= (((ulong) 1) << bits) - 1;
-#if BITS_SAVED == 16
- if (bits >= sizeof(uint))
- {
- bits-=8;
- *file_buffer.pos++= (uchar) (value >> bits);
- value&= (1 << bits)-1;
- if (bits >= sizeof(uint))
- {
- bits-=8;
- *file_buffer.pos++= (uchar) (value >> bits);
- value&= (1 << bits)-1;
- }
- }
-#endif
+ value&= (((ulonglong) 1) << bits) - 1;
if (file_buffer.pos >= file_buffer.end)
VOID(flush_buffer(~ (ulong) 0));
file_buffer.bits=(int) (BITS_SAVED - bits);
- file_buffer.current_byte=(uint) (value << (BITS_SAVED - bits));
+ file_buffer.bitbucket= value << (BITS_SAVED - bits);
}
return;
}
/* Flush bits in bit_buffer to buffer */
-static void flush_bits (void)
+static void flush_bits(void)
{
- uint bits,byte_buff;
+ int bits;
+ ulonglong bit_buffer;
- bits=(file_buffer.bits) & ~7;
- byte_buff = file_buffer.current_byte >> bits;
- bits=BITS_SAVED - bits;
+ bits= file_buffer.bits & ~7;
+ bit_buffer= file_buffer.bitbucket >> bits;
+ bits= BITS_SAVED - bits;
while (bits > 0)
{
- bits-=8;
- *file_buffer.pos++= (byte) (uchar) (byte_buff >> bits) ;
+ bits-= 8;
+ *file_buffer.pos++= (byte) (bit_buffer >> bits) ;
}
- file_buffer.bits=BITS_SAVED;
- file_buffer.current_byte=0;
- return;
+ file_buffer.bits= BITS_SAVED;
+ file_buffer.bitbucket= 0;
}
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 2
- Problems installing DBD::mysql-2.9004 under 64 bit linux------=_NextPart_000_0001_01C4B74B.32EBC940
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0002_01C4B74B.32EBC940"
------=_NextPart_001_0002_01C4B74B.32EBC940
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Good morning.
When I tried to make DBD::mysql on my Dell Precision workstation
running:
Linux localhost.localdomain 2.4.21-20.EL #1 SMP Wed Aug 18 20:34:58 EDT
2004 x86_64 x86_64 x86_64 GNU/Linux
And mysql server version: 4.0.21-standard
I get the following error:
cc -c -I/usr/lib64/perl5/site_perl/5.8.0/auto/DBI/ -I/usr/local/include
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe
-DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\" -fPIC
"-I/usr/lib64/perl5/5.8.0/x86_64-linux-thread-multi/CORE" mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/lib64" /usr/bin/perl myld gcc -shared dbdimp.o
mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/lib
-lmysqlclient -lz -lcrypt -lnsl -lm
/usr/bin/ld: /usr/local/lib/libmysqlclient.a(libmysql.o): relocation
R_X86_64_32S can not be used when making a shared object; recompile with
-fPIC
/usr/local/lib/libmysqlclient.a: could not read symbols: Bad value
Is this caused by the 64 bit nature of my system? How do I recompile
libmysqlclient.a(???) with the -fPIC switch? Is there an RPM version of
this that will run with Red Hat Enterprise linux?
Thanks for any help you can provide and have a great day.
Fred Magee
ATK Mission Research
(505)768-7783
email***@***.com
------=_NextPart_001_0002_01C4B74B.32EBC940
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:email***@***.com">
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"time"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"place"/>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-believe-normal-left:yes;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle17
{mso-style-type:personal-compose;
mso-style-noshow:yes;
color:black;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--><![if mso 9]>
<style>
p.MsoNormal
{margin-left:7.5pt;}
</style>
<![endif]><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=3Dwhite background=3D"cid:email***@***.com" =
lang=3DEN-US
link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:.5in;margin-left:7.5pt;margin-top:
18.75pt'>
<img src=3D"cid:email***@***.com"
v:src=3D"cid:email***@***.com" v:shapes=3D"_x0000_Mail" =
width=3D0
height=3D0 class=3Dshape style=3D'display:none;width:0;height:0'>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>Good =
morning.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>When I tried to make DBD::mysql =
on my Dell
Precision workstation running:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>Linux localhost.localdomain =
2.4.21-20.EL
#1 SMP Wed Aug 18 </span></font><st1:time Hour=3D"20" =
Minute=3D"34"><font
color=3Dblack><span style=3D'color:black'>20:34:58 =
EDT</span></font></st1:time><font
color=3Dblack><span style=3D'color:black'> 2004 x86_64 x86_64 x86_64 =
GNU/Linux<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>And mysql server version: =
4.0.21-standard<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>I get the following =
error:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<p class=3DMsoNormal style=3D'margin-left:7.5pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span style=3D'font-size:12.0pt;color:black'>cc =
-c<span
style=3D'mso-spacerun:yes'>
</span>-I/usr/lib64/perl5/site_perl/5.8.0/auto/DBI/ -I/usr/local/include
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING =
-fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 =
-I/usr/include/gdbm
-O2 -g -pipe<span style=3D'mso-spacerun:yes'>
</span>-DVERSION=3D\"2.9004\" =
-DXS_VERSION=3D\"2.9004\" -fPIC
"-I/usr/lib64/perl5/5.8.0/x86_64-linux-thread-multi/CORE"<span
style=3D'mso-spacerun:yes'> =
</span>mysql.c<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:7.5pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>Running
Mkbootstrap for DBD::mysql ()<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:7.5pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>chmod 644
mysql.bs<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:7.5pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span style=3D'font-size:12.0pt;color:black'>rm =
-f
blib/arch/auto/DBD/mysql/mysql.so<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:7.5pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>LD_RUN_PATH=3D"/usr/lib64&quo=
t;
/usr/bin/perl myld gcc<span style=3D'mso-spacerun:yes'> =
</span>-shared
dbdimp.o mysql.o<span style=3D'mso-spacerun:yes'> </span>-o
blib/arch/auto/DBD/mysql/mysql.so<span =
style=3D'mso-spacerun:yes'>
</span>-L/usr/local/lib -lmysqlclient -lz -lcrypt -lnsl =
-lm<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:7.5pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>/usr/bin/ld:
/usr/local/lib/libmysqlclient.a(libmysql.o): relocation R_X86_64_32S can =
not be
used when making a shared object; recompile with =
-fPIC<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:7.5pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>/usr/local/lib/libmysqlclient.a:
could not read symbols: Bad value<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>Is this caused by the 64 bit =
nature of my
system?<span style=3D'mso-spacerun:yes'> </span>How do I recompile
libmysqlclient.a(???) with the –fPIC switch?<span
style=3D'mso-spacerun:yes'> </span>Is there an RPM version of this =
that
will run with Red Hat Enterprise linux?<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>Thanks for any help you can =
provide and
have a great day.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'><o:p> </o:p></span></font></p=
>
<div>
<p class=3DMsoAutoSig><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black;mso-no-proof:yes'>Fred =
Magee<o:p></o:p></span></font></p>
<p class=3DMsoAutoSig><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black;mso-no-proof:yes'>ATK =
</span></font><st1:place><font
color=3Dblack><span =
style=3D'color:black;mso-no-proof:yes'>Mission</span></font></st1:place><=
font
color=3Dblack><span style=3D'color:black;mso-no-proof:yes'> =
Research<o:p></o:p></span></font></p>
<p class=3DMsoAutoSig><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black;mso-no-proof:yes'>(505)768-7783<o:p=
></o:p></span></font></p>
<p class=3DMsoAutoSig><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black;mso-no-proof:yes'>fred.magee@mrcabq=
.com<o:p></o:p></span></font></p>
</div>
<p><font size=3D2 color=3D"#0033cc" face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial;color:#0033CC'> <o:p></o:p></span></font></p>
</div>
</body>
</html>
------=_NextPart_001_0002_01C4B74B.32EBC940--
------=_NextPart_000_0001_01C4B74B.32EBC940--
- 3
- QueryInterval Variable?------_=_NextPart_001_01C347D8.A7AA48EE
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I recently noticed that my MySQL server was getting about 3 connections =
every 2 seconds. Checking the error log I discovered that a user =
'email***@***.com' was trying to connect to the server over and over and =
over and failing each time. Curious as to what this 'user' was trying =
to do, I allowed the user to connect. It turns out that the user simply =
executed the commands: SHOW DATABASES LIKE %, SHOW PROCESSLIST, SHOW =
STATUS once and then continued to SHOW STATUS every 10 seconds until I =
killed the connection, at which point it started the entire sequence =
again.
=20
After much trial and error I discovered that changing the line =
"QueryInterval=3D10" in the my.cnf file to "QueryInterval=3D0" would fix =
this problem, and kept the user from trying to log onto the server.=20
=20
However, I have no idea why this worked an cannot find information =
anywhere about the "QueryInterval" Variable.
=20
Does anyone know what effect my changing the value of QueryInterval will =
have, or where I can find information about it, most importantly, will =
changing the value to zero have any adverse effects on the server?
=20
Thanks,
-Charlie
=20
=20
P.S. I'm running 4.0.13-nt on Windows 2000 Server and using ODBC to =
connect from a variety of other systems.
------_=_NextPart_001_01C347D8.A7AA48EE--
- 4
- bk commit into 4.1 tree (monty:1.2295)Below is the list of changes that have just been committed into a local
4.1 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2295 05/05/25 12:57:29 email***@***.com +1 -0
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
sql/sql_parse.cc
1.436 05/05/25 12:57:28 email***@***.com +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: narttu.mysql.com
# Root: /home/my/mysql-4.1/RESYNC
--- 1.435/sql/sql_parse.cc 2005-05-24 15:38:32 +03:00
+++ 1.436/sql/sql_parse.cc 2005-05-25 12:57:28 +03:00
@@ -2823,8 +2823,8 @@
TABLE *table= tables->table;
/* Skip first table, which is the table we are inserting in */
- lex->select_lex.table_list.first= (byte*) first_local_table->next;
- tables= (TABLE_LIST *) lex->select_lex.table_list.first;
+ select_lex->table_list.first= (byte*) first_local_table->next;
+ tables= (TABLE_LIST *) select_lex->table_list.first;
first_local_table->next= 0;
if (!(res= mysql_prepare_insert(thd, tables, first_local_table,
@@ -5394,6 +5394,7 @@
1 error (message is sent to user)
-1 error (message is not sent to user)
*/
+
int multi_delete_precheck(THD *thd, TABLE_LIST *tables, uint *table_count)
{
DBUG_ENTER("multi_delete_precheck");
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 5
- two version ?my version is 4.17 at last year.
now is 5.0.18.
I install them in zip file at the same directory.
but use client_info() ,output 4.17
server_info, is 5.0.18
I have updated service
--
gtalk:email***@***.com
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=email***@***.com
- 6
- Connector/J commit: r4320 - tagsAdded:
tags/b5_0-nightly-20050928_000402/
Log:
Tagging the nightly build
Copied: tags/b5_0-nightly-20050928_000402 (from rev 4319, branches/branch_5_0/connector-j)
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 7
- SUM + IIS problem updateHi,
I've just noticed that the problem I'm having can be summarised more easily.
If I issue:
SELECT SUM(ncount) FROM guess
in MySQL I get an answer, however, in ASP, running on IIS I get no records
returned on my new server. The old server is returning the correct answer.
The servers are identical (at least they appear to be). Both running the
same version of Windows 2003, IIS, MySQL, MDAC.
Does this prompt any ideas for me to check something else?
--
Kev
- 8
- bk commit into 5.0 tree (gluh:1.1975) BUG#11775Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1975 05/09/07 15:38:09 email***@***.com +4 -0
Fix for bug#11775 Variable character_set_system does not exist (sometimes).
Variable character_set_system is selectable now
More accurate error message results during
update of character_set_system and some other read only variables
sql/set_var.h
1.70 05/09/07 15:36:58 email***@***.com +2 -1
Fix for bug#11775 Variable character_set_system does not exist (sometimes).
Variable character_set_system is selectable now
More accurate error message results during
update of character_set_system and some other read only variables
sql/set_var.cc
1.139 05/09/07 15:36:58 email***@***.com +3 -26
Fix for bug#11775 Variable character_set_system does not exist (sometimes).
Variable character_set_system is selectable now
More accurate error message results during
update of character_set_system and some other read only variables
mysql-test/t/variables.test
1.49 05/09/07 15:36:58 email***@***.com +9 -0
Fix for bug#11775 Variable character_set_system does not exist (sometimes).
test case
mysql-test/r/variables.result
1.73 05/09/07 15:36:58 email***@***.com +7 -0
Fix for bug#11775 Variable character_set_system does not exist (sometimes).
test case
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gluh
# Host: eagle.intranet.mysql.r18.ru
# Root: /home/gluh/MySQL/Merge/5.0
--- 1.72/mysql-test/r/variables.result Sat Sep 3 00:41:58 2005
+++ 1.73/mysql-test/r/variables.result Wed Sep 7 15:36:58 2005
@@ -545,3 +545,10 @@
select @@have_innodb;
@@have_innodb
#
+select @@character_set_system;
+@@character_set_system
+utf8
+set global character_set_system = latin1;
+ERROR HY000: Variable 'character_set_system' is a read only variable
+set @@global.version_compile_os='234';
+ERROR HY000: Variable 'version_compile_os' is a read only variable
--- 1.48/mysql-test/t/variables.test Sat Sep 3 00:40:59 2005
+++ 1.49/mysql-test/t/variables.test Wed Sep 7 15:36:58 2005
@@ -435,3 +435,12 @@
--replace_column 1 #
select @@have_innodb;
+
+#
+# Bug #11775 Variable character_set_system does not exist (sometimes)
+#
+select @@character_set_system;
+--error 1238
+set global character_set_system = latin1;
+--error 1238
+set @@global.version_compile_os='234';
--- 1.138/sql/set_var.cc Tue Sep 6 22:51:08 2005
+++ 1.139/sql/set_var.cc Wed Sep 7 15:36:58 2005
@@ -142,11 +142,8 @@
sys_var_thd_ulong sys_bulk_insert_buff_size("bulk_insert_buffer_size",
&SV::bulk_insert_buff_size);
sys_var_character_set_server sys_character_set_server("character_set_server");
-sys_var_str sys_charset_system("character_set_system",
- sys_check_charset,
- sys_update_charset,
- sys_set_default_charset,
- (char *)my_charset_utf8_general_ci.name);
+sys_var_const_str sys_charset_system("character_set_system",
+ (char *)my_charset_utf8_general_ci.name);
sys_var_character_set_database sys_character_set_database("character_set_database");
sys_var_character_set_client sys_character_set_client("character_set_client");
sys_var_character_set_connection sys_character_set_connection("character_set_connection");
@@ -569,6 +566,7 @@
&sys_character_set_client,
&sys_character_set_connection,
&sys_character_set_results,
+ &sys_charset_system,
&sys_collation_connection,
&sys_collation_database,
&sys_collation_server,
@@ -1115,27 +1113,6 @@
{
strmake(ft_boolean_syntax, def_ft_boolean_syntax,
sizeof(ft_boolean_syntax)-1);
-}
-
-/*
- The following 3 functions need to be changed in 4.1 when we allow
- one to change character sets
-*/
-
-static int sys_check_charset(THD *thd, set_var *var)
-{
- return 0;
-}
-
-
-static bool sys_update_charset(THD *thd, set_var *var)
-{
- return 0;
-}
-
-
-static void sys_set_default_charset(THD *thd, enum_var_type type)
-{
}
--- 1.69/sql/set_var.h Fri Jul 29 00:39:07 2005
+++ 1.70/sql/set_var.h Wed Sep 7 15:36:58 2005
@@ -190,6 +190,7 @@
return 1;
}
bool check_default(enum_var_type type) { return 1; }
+ bool is_readonly() const { return 1; }
};
@@ -900,7 +901,7 @@
bool not_all_support_one_shot(List<set_var_base> *var_list);
void fix_delay_key_write(THD *thd, enum_var_type type);
ulong fix_sql_mode(ulong sql_mode);
-extern sys_var_str sys_charset_system;
+extern sys_var_const_str sys_charset_system;
extern sys_var_str sys_init_connect;
extern sys_var_str sys_init_slave;
extern sys_var_thd_time_zone sys_time_zone;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 9
- speed up updates on primary keyHi,
I have a bunch of tables with about 0.5-1 million rows and I need to
update the primary key, adding a number to it like this:
UPDATE table_36 SET feature_id=feature_id+82924527
This takes a lot of time to process and I was wondering how can I
speed this process. I've seen "ALTER TABLE ... DISABLE KEYS" but it
says it will speed up INSERTs:
ALTER TABLE ... ENABLE KEYS then should be used to re-create missing
indexes. MySQL does this with a special algorithm that is much faster
than inserting keys one by one, so disabling keys before performing
bulk insert operations should give a considerable speedup.
Will this also speed up my UPDATEs?
- 10
- Connection Problem after Power OutagesI have an application running on windows 2000, and using mySQL version
4.1.7, and myODBC version 3.51.10. Everytime there is a power outage,
my application can no longer connect to mySQL. I get the message:
"cannot connect to MySQL server on 'localhost' (10061)". To make it
work again, I have to relaunch the installation of mySQL and choose
the "repair option."
Is there a way to prevent the problem from occuring in the first
place?
CJ
- 11
- t/60leaks test skippedOn Tue, 26 Aug 2003, Matt Lyon wrote:
> As the title says the test was skipped on the make test. All others were ok.
> When doing make test TEST_VERBOSE=1 it returned $ENV_{SLOW_TESTS} is not
> set.
>
You can safely ignore that.
> I don't know what do do now. I am trying to get it installed correctly cause
> I am gettnig an error when trying to run WebGUI and I get an error message
> that perhaps a module DBD::mysql need isn't installed properly.
>
Did you do a make install on DBD::mysql? otherwise, You might want to look
at your server logs and see exactly what it is complaining about.
Rudy
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=email***@***.com
- 12
- Dropping table using Select resultI have a shopping cart which creates temporary tables in the format of
zorder_<phpsessionid>;
These tables are used to hold a customers order while they shop and
after checking out, it is dropped. The values of the shopping cart are
put together in an HTML table and stored as their history.
What I want to do is to run a cron job to delete the orders which were
left undone once a day at about midnight. Here is my current query
SELECT table_name FROM orders WHERE RIGHT(started,8) < RIGHT(NOW(),8)
AND completed < 1 AND LEFT(started,10) = LEFT(NOW(),10);
I was hoping to do something like this:
DROP TABLE (SELECT table_name FROM orders WHERE RIGHT(started,8) <
RIGHT(NOW(),8) AND completed < 1 AND LEFT(started,10) = LEFT(NOW(),10));
But from my understanding, MySQL does not support nested queries.
Is there a query-based way to do this...
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=email***@***.com
- 13
- From: Mr. James Odibo
This is a multi-part message in MIME format
--fc9ef52d-b839-4e9a-b629-3da4036704b7
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
From: Mr. James Odibo (Unclaimed Fund)
Email: email***@***.com
Hello,
I am sending you this private email to make a passionate appeal to you for =
assistance. Kindly accept my apology for contacting you this way and forgive =
me if this is not acceptable to you. My name is James Odibo ; I am an auditor =
at one of the Nigerian Banks.
On Tuesday, 19 January, 1999, one Dr. H. Paul Jacobi a foreigner, made a =
numbered time (Fixed) Deposit, valued at =A310,550,000.00 (Ten Million, Five =
Hundred and Fifty Thousand Pounds) for twelve calendar months in my Bank =
Branch. Upon Maturity, we sent a routine notification to his forwarding =
address but got no reply. After a month, we sent a reminder and finally we =
discovered from his company that Dr. Paul A. Jacobi was aboard the Egypt Air =
Flight 990, which crashed into the Atlantic Ocean on October 31, 1999. After =
further investigation, it was discovered that he died without making a WILL =
and all attempts to trace his next of kin proved abortive.
On further investigation, it was discovered that Late Dr. Paul A. Jacobi did =
not declare any next of kin or relatives in all his official documents, =
including his Bank Deposit paper work here in our Bank. The total sum, =A3=
10,550,000.00 is still in my bank and the interest is being rolled over with =
the principal sum at the end of each year. No one will ever come forward to =
claim it.
In accordance with my country's banking laws and constitution, at the =
expiration of 6 (six) years, the money will revert to the Government treasury =
if nobody applies as the next of Kin to claim the funds. Consequently, I =
shall present you as a foreign partner to stand in as the next of kin to the =
late Dr. Paul A. Jacobi. Upon acceptance of this proposal, I shall send to =
you the National Bank Plc "Next of Kin Payment Application Form" as well as =
detailed information on how this transaction would be carried out. We shall =
employ the services of a solicitor for the drafting of the LAST WILL & =
TESTAMENT of Late Dr. Paul A. Jacobi and to obtain all other relevant papers =
in your name for the necessary documentation for payment approval in my bank =
headquarters in your favour. The money will be shared in the ratio: Sixty =
percent for me and my colleagues, thirty percent for you and 10% would be set =
aside to offset all expenses in course of the transfer.
I guarantee that this will be executed under legitimate arrangement that will =
protect you from any breach of the law as I and my colleagues will use my =
position to guarantee the successful execution of this transaction. Please be =
informed that your utmost confidentiality is required. Should this proposal =
meet your interests respond back via my alternate email
<email***@***.com>.
Awaiting your urgent response.
Respectfully ,
Mr. James Odibo
--fc9ef52d-b839-4e9a-b629-3da4036704b7--
- 14
- Questions on binary log, relay-log.info while troubleshooting a crashI'm having trouble understanding the output of mysqlbinlog and the contents of
relay-log.info while troubleshooting a crash on the slave. Here's a sample (all
samples are slightly obfuscated, so in case anyone tries to repro this, I can supply
the exact samples, but not on this mailing list):
==snip==
slave mysql # mysqlbinlog slave-relay-bin.000008 | head -n 50
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
# at 4
#061127 10:28:53 server id 40 end_log_pos 98 Start: binlog v 4, server v
5.0.26-standard created 061127 10:28:53
# at 98
#691231 19:00:00 server id 9 end_log_pos 141 Rotate to master-bin.000003 pos: 4
# at 141
#061118 3:31:18 server id 9 end_log_pos 98 Start: binlog v 4, server v
5.0.26-standard-log created 061118 3:31:18
# at 235
#061118 3:31:19 server id 9 end_log_pos 168 Query thread_id=2387 exec_time=0
error_code=0
use mymain;
SET TIMESTAMP=1163838679;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1,
@@session.unique_checks=1;
SET @@session.sql_mode=0;
/*!\C latin1 */;
SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
BEGIN;
# at 305
#061118 3:31:12 server id 9 end_log_pos 136 Query thread_id=2387 exec_time=0
error_code=0
SET TIMESTAMP=1163838672;
delete from mytrack2.bizzleday where day = '2006-08-12' and bizzle = '12157511';
# at 441
==snip==
Question 1: I can't figure out which lines the delimiters belong to. When the log
says, for example, "# at 305" does that mean the previous statement is at position 305,
or the next statement? Same thing with the timestamp line (tangent: it would be great
if MySQL always printed date/time in the same format).
Question 2: when my slave crashes and the relay log info is as follows:
==snip==
slave mysql # cat relay-log.info
./slave-relay-bin.000008
275870598
master-bin.000003
275870461
5
==snip==
What is position 275870598? Is that the position of the statement which was last
successfully executed, or the position that caused the crash? In this particular case,
depending on the answer to question 1, it was either COMMIT or BEGIN that caused the
crash. (Stack trace is at the very end of this message). Neither COMMIT nor BEGIN
matches the output in /var/log/mysql/mysqld.err, so that doesn't make sense to me. I
think the LOAD DATA INFILE caused the trouble, but that statement isn't found near
position 275870598 in the relay log.
Question 3: when is relay-log.info written and flushed to disk? After each transaction
commits, hopefully? Knowing this would help me know whether its contents are relevant
to troubleshooting this crash.
Question 4: is there documentation about what the contents of master.info and
relay-log.info mean? I can't find any. I'm guessing about the above -- I think the
slave thread was reading through ./slave-relay-bin.000008 at position 275870598, which
I think corresponds to position 275870461 in the master's log (master-bin.000003), but
I'm not sure. What is the final "5" in that file?
Probably http://dev.mysql.com/doc/refman/5.0/en/mysqlbinlog.html and other nearby pages
should have this information. I can submit a bug report on that once I figure out what
to say in the report :-)
Thanks,
Baron
== resolved stack trace follows ==
slave mysql-standard-5.0.26-linux-i686 # bin/resolve_stack_dump -s /tmp/mysqld.sym ~/stack
0x80a0a12 handle_segfault + 430
0x82fb4e8 pthread_sighandler + 184
0x82b0d99 free_root + 133
0x81020f1 mysql_reset_errors__FP3THDb + 85
0x81021b4 push_warning__FP3THDQ211MYSQL_ERROR18enum_warning_levelUiPCc + 112
0x810235b push_warning_printf__FP3THDQ211MYSQL_ERROR18enum_warning_levelUiPCce + 55
0x80948f4 set_warning__5FieldQ211MYSQL_ERROR18enum_warning_levelUii + 132
0x808b846 store__10Field_longPCcUiP15charset_info_st + 242
0x81513e2
read_sep_field__FP3THDR12st_copy_infoP13st_table_listRt4List1Z4ItemN23R9READ_INFOR6StringUlb
+ 574
0x81509d0
mysql_load__FP3THDP12sql_exchangeP13st_table_listRt4List1Z4ItemN2315enum_duplicatesbT7
+ 2384
0x80b4b89 mysql_execute_command__FP3THD + 10101
0x80b944a mysql_parse__FP3THDPcUi + 286
0x8111059 exec_event__15Query_log_eventP17st_relay_log_infoPCcUi + 1073
0x8115453 exec_event__28Execute_load_query_log_eventP17st_relay_log_info + 299
0x816cac9 exec_relay_log_event__FP3THDP17st_relay_log_info + 729
0x816d91b handle_slave_sql + 787
0x82f8c9c pthread_start_thread + 220
0x83412ea thread_start + 4
== error log output follows ==
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=67108864
read_buffer_size=1044480
max_used_connections=6
max_connections=120
threads_connected=5
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 310815 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd=0x8c03330
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=0xbf75ea88, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80a0a12
0x82fb4e8
0x82b0d99
0x81020f1
0x81021b4
0x810235b
0x80948f4
0x808b846
0x81513e2
0x81509d0
0x80b4b89
0x80b944a
0x8111059
0x8115453
0x816cac9
0x816d91b
0x82f8c9c
0x83412ea
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/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
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8b649f0 = LOAD DATA INFILE '/tmp/SQL_LOAD-40-9-1356.data' IGNORE INTO
TABLE mytemp.partnerbizzle
FIELDS TERMINATED BY '|' ENCLOSED BY '"' LINES TERMINATED BY '\n'
(bizzletype,bcents,ctype,categoryid,desc,vend,acct,bizzleid,market,online,bizzleaccountid,bizzlead,thing,stuff,stash,title)
thd->thread_id=36
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.
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 15
- New Free BitKeeper ClientNew Free BitKeeper Client
-------------------------
If you're installing MySQL from our development source trees you need
BitKeeper to access those source trees. You can find out which source
trees are publicly available by looking at http://mysql.bkbits.net/.
BitKeeper isn't free software, but there's a free client you can use
to get read access to MySQL source trees (and that's all you need to
install MySQL from a development tree). This year, that free BitKeeper
client has been upgraded to version 2.0. The new version is needed to
access the source trees; version 1.1 will not work any more for that
purpose.
The new free BitKeeper client provides a number of enhancements over the
old client. Among other things, it has an integrated help, and the
commands you can use are very similar to the commands of the commercial
version (for example, "bkf clone" or "bkf pull"). The MySQL Reference
Manual has been updated with information about the new client; see:
http://dev.mysql.com/doc/refman/5.0/en/installing-source-tree.html
(replace "5.0" in the URL with "4.1" or "5.1" for other versions).
Regards,
Stefan
--
Stefan Hinz <email***@***.com>
MySQL AB Documentation Team Lead. Berlin, Germany (UTC +2:00)
Skype:stefanhinz Cell:+491777841069 Desk:+493082702940 Fax:+493082702941
|
|
|