 |
 |
Index ‹ mysql
|
- Previous
- 1
- InnoDB, Can't create tableHi
I had error message "Can't create table *.frm (errno:121)" when I was
trying to create an innoDB table in MySQL Server 4.0.15. I know that
the reason is the .frm files was deleted by some one which left data
files.
Does anybody know how to report and repair this sort of error.
Thanks
Nelson
- 2
- MySQL variables, modifying Microsoft SQL sequence insert for use in mysqlI have the following microsoft SQL statement that inserts 25 new
records in sequence. However I am trying to modify this to work in
MySQL.
I cant seem to get the variable decleration right. I tried using
DECLARE CurVal int but that generates a mysql error. How can I modify
the code below to work under mysql?
----------
DECLARE @CurVal int
DECLARE @FinalVal int
SELECT @CurVal = MAX(IdField) FROM MyTable
SET @FinalVal = @CurVal + 25
WHILE (@CurVal < @FinalVal)
BEGIN
SET @CurVal = @CurVal + 1
INSERT INTO `tbl_listings` ( `listnum`)
VALUES (@Curval);
PRINT @CurVal
END
- 2
- Recommend a Database...MYSQL..Hi
My team has been assigned the work to manage the translation of Front
Office Products of our company. The goal is to translate all the
strings in different languages like French, Spanish, Italian etc. In
order to automate the update/delete/addition/retieval of strings, we
plan to use a database. Each strings will identified by unique ID and
we plan to keep the translations in the same database. Not more than
25 users will have access to the database.
Approximate number of strings are 5000. We are using Windows2000
platform.
Could you please suggest me the following:
1. Which database we should go for? MYSQL/MS-Access??
2. How is the compatibility of MYSQL with Windows?
3. About the database design, could you suggest me if it will be
better to build different table for different languages or store the
translations in the same table?
Your suggestions are valuable to us. Thanks in advance
Navin
- 6
- Macromedia Studio MX 2004 - wholesale priceThis is a multi-part message in MIME format.
------=_NextPart_000_0000_04C083B9.3135FD36
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0001_8B5F839C.6D010880"
------=_NextPart_001_0001_8B5F839C.6D010880
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Get all the software you need for prices substantially lower than in stores!
We sell software 2-6 times cheaper than retail price.
Examples:
$80 Windows XP Professional
$120 Microsoft Office 2003 Professional
$100 Adobe Photoshop 8.0/CS
$50 Norton Internet Security Pro 2004 Professional (Including: AntiVirus + AntiSpam + Firewall)
$180 Macromedia Studio MX 2004 (Including: Dreamweaver MX + Flash MX + Fireworks MX)
$150 Adobe Acrobat 6.0 Professional
$20 Red Hat Linux 7.3
Categories: Business, Internet, Antivirus, Security, etc.<br>
And many more... Visit us at:
http://www.triasoft.biz
Best regards,
Alice Walker
_____________________________________________________
To change your mail details, go here: http://www.triasoft.biz/uns.htm
_____________________________________________________
------=_NextPart_001_0001_8B5F839C.6D010880
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
<HTML>
<BODY>
<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width=800 align=center border=0>
<TBODY>
<TR>
<TD>
Get all the software possible for less!<br>
Our software is 2-10 times cheaper than sold by our competitors.<br><br>
Examples:<br><br>
$80 Windows XP Professional<br>
$120 Microsoft Office 2003 Professional<br>
$100 Adobe Photoshop 8.0/CS<br>
$50 Norton Internet Security Pro 2004 Professional (Including: AntiVirus + AntiSpam + Firewall)<br>
$180 Macromedia Studio MX 2004 (Including: Dreamweaver MX + Flash MX + Fireworks MX)<br>
$150 Adobe Acrobat 6.0 Professional<br>
$20 Red Hat Linux 7.3<br><br>
Categories: Business, Internet, Antivirus, Security, etc.<br>
And many other... Go visit us at:<br><br>
<A href="http://www.triasoft.biz">http://www.triasoft.biz</A><br><br>
Best,<br>
Alice A. Walker<br><br><br>
_____________________________________________________ <br>
To be taken out, go: <A href="http://www.triasoft.biz/uns.htm">http://www.triasoft.biz/uns.htm</A><br>
_____________________________________________________
<P></P></TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
------=_NextPart_001_0001_8B5F839C.6D010880--
------=_NextPart_000_0000_04C083B9.3135FD36--
- 7
- bk commit into 5.0 tree (reggie:1.1973)Below is the list of changes that have just been committed into a local
5.0 repository of reggie. When reggie 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.1973 05/08/09 22:11:21 email***@***.com +1 -0
Merge email***@***.com:/home/bk/mysql-5.0
into linux.site:/home/reggie/bk/mysql-5.0-new
server-tools/instance-manager/IMService.cpp
1.6 05/08/09 22:10:57 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: reggie
# Host: linux.site
# Root: /home/reggie/bk/mysql-5.0-new/RESYNC
--- 1.5/server-tools/instance-manager/IMService.cpp 2005-08-08 22:41:22 -06:00
+++ 1.6/server-tools/instance-manager/IMService.cpp 2005-08-09 22:10:57 -06:00
@@ -50,7 +50,7 @@
else
{
log_info("Service failed to install");
- ret_val= -1;
+ ret_val= 1;
}
}
else if (options.remove_service)
@@ -62,10 +62,10 @@
else
{
log_info("Service failed to remove");
- ret_val= -1;
+ ret_val= 1;
}
}
else
- return (int)winService.Init();
+ ret_val= !winService.Init();
return ret_val;
}
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 7
- renaming databaseHi,
How can I rename a database if it contains InnoDB tables?
I have tried renaming the directory where it is located, but it doesn't work
this way.
Is there a method that works faster than dumping it with mysqldump then
re-create it under another name?
Thanks.
Octavian
- 7
- convert varchar to dateI have a table that imports data from text files, and the dates come
in as YYYYMMDD into a varchar column.
I need to compare those dates to a column in an existing table that is
date format YYYY-MM-DD
I was thinking that CONVERT(DATETIME,temp_table_field) =
'existing_table_field' but keep getting a syntax error.
- 8
- bk commit into 4.1 tree (aivanov:1.2451) BUG#10511Below is the list of changes that have just been committed into a local
4.1 repository of alexi. When alexi 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.2451 05/10/28 17:16:22 email***@***.com +1 -0
Fix BUG#10511: Wrong padding of UCS2 CHAR columns in
ON UPDATE CASCADE
innobase/row/row0ins.c
1.55 05/10/28 17:15:52 email***@***.com +38 -8
Patch from Marko is applied
# 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: aivanov
# Host: mysql.creware.com
# Root: /home/alexi/dev/mysql-4.1-10511
--- 1.54/innobase/row/row0ins.c 2005-04-18 13:17:09 +04:00
+++ 1.55/innobase/row/row0ins.c 2005-10-28 17:15:52 +04:00
@@ -522,20 +522,50 @@
&& ufield->new_val.len
< dtype_get_fixed_size(type)) {
+ ulint cset;
+
ufield->new_val.data =
mem_heap_alloc(heap,
dtype_get_fixed_size(type));
ufield->new_val.len =
dtype_get_fixed_size(type);
- ut_a(dtype_get_pad_char(type)
- != ULINT_UNDEFINED);
- memset(ufield->new_val.data,
- (byte)dtype_get_pad_char(type),
- dtype_get_fixed_size(type));
- ut_memcpy(ufield->new_val.data,
- parent_ufield->new_val.data,
- parent_ufield->new_val.len);
+ /* Handle UCS2 strings differently.
+ As no new collations will be
+ introduced in 4.1, we hardcode the
+ charset-collation codes here.
+ In 5.0, the logic is based on
+ mbminlen. */
+ cset = dtype_get_charset_coll(
+ dtype_get_prtype(type));
+
+ if (cset == 35/*ucs2_general_ci*/
+ || cset == 90/*ucs2_bin*/
+ || (cset >= 128/*ucs2_unicode_ci*/
+ && cset <= 144
+ /*ucs2_persian_ci*/)) {
+ /* space=0x0020 */
+ ulint i;
+ for (i = 0;
+ i < ufield->new_val.len;
+ i += 2) {
+ mach_write_to_2(((byte*)
+ ufield->new_val.data)
+ + i, 0x0020);
+ }
+ } else {
+ ut_a(dtype_get_pad_char(type)
+ != ULINT_UNDEFINED);
+
+ memset(ufield->new_val.data,
+ (byte)dtype_get_pad_char(
+ type),
+ ufield->new_val.len);
+ }
+
+ memcpy(ufield->new_val.data,
+ parent_ufield->new_val.data,
+ parent_ufield->new_val.len);
}
ufield->extern_storage = FALSE;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 10
- Toplink vs Hibernate - mysqlHi all
I'm comparing toplink and hibernate in ejb3.0 and it seems toplink is faster
in lazy mode but slower in eager mode why ?:P
I found out that toplink uses multiple single selects to get collection and
hibernate create one single sql with many joins.
example
user contains a list of computer
toplink create 2 selects and bind the
hibernate create one join select
The question is which one of this methods will be more efficent when we will
have a lot of rows in database and if mysql is beter in multiple selects or
one big select with join ?
- 11
- dropping uniqueness of a fieldI have a unique constraint on a field that is neither a primary key
nor an index field.
How do I remove the unique constraint without deleting the field?
Thanks
John
- 11
- only dos type menu avail?I just downloaded mysql. the menu appears to be commandline (dos)
style. there is freeware/shareware of some desktop UI to manage the
database?
- 14
- Very Slow Select QueryHello,
I have a table with more than 1,000,000 rows.
mysql> describe views_date;
+----------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| id_count | bigint(20) | YES | | NULL | |
| date | datetime | YES | | NULL | |
| type | int(3) | YES | | NULL | |
| ip | varchar(15) | YES | | NULL | |
| user | bigint(20) | YES | | NULL | |
+----------+-------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
This table is used to log info on which video the visitor has viewed
and its IP address.
Everytime a visitor views a video a new row is inserted.
Then I use the following query to know if the visitor has already
viewed the video:
mysql> SELECT count(*) from views_date WHERE id_count = $videoid AND
ip = '$ip';
+----------+
| count(*) |
+----------+
| 1 |
+----------+
1 row in set (6.19 sec)
mysql> explain SELECT count(*) from views_date WHERE id_count = 8731
AND ip = '121.97.245.124';
+----+-------------+------------+------+---------------+------
+---------+------+---------+-------------+
| id | select_type | table | type | possible_keys | key |
key_len | ref | rows | Extra |
+----+-------------+------------+------+---------------+------
+---------+------+---------+-------------+
| 1 | SIMPLE | views_date | ALL | NULL | NULL |
NULL | NULL | 1089103 | Using where |
+----+-------------+------------+------+---------------+------
+---------+------+---------+-------------+
1 row in set (0.04 sec)
Can anyone give me tips on how to optimize the table to run faster
queries?
Thanks!
Antoni
- 14
- svn commit - mysqldoc@docsrva: r500 - in trunk: . refman-5.1 refman-commonAuthor: paul
Date: 2005-12-06 19:03:52 +0100 (Tue, 06 Dec 2005)
New Revision: 500
Log:
r4530@frost: paul | 2005-12-06 12:03:09 -0600
New cp1250_polish_ci collation. (WL#1653)
Modified:
trunk/
trunk/refman-5.1/charset.xml
trunk/refman-common/news-5.1.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:4525
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1505
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:4530
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1505
Modified: trunk/refman-5.1/charset.xml
===================================================================
--- trunk/refman-5.1/charset.xml 2005-12-06 16:44:26 UTC (rev 499)
+++ trunk/refman-5.1/charset.xml 2005-12-06 18:03:52 UTC (rev 500)
@@ -2802,16 +2802,18 @@
</itemizedlist>
<para>
- <emphasis>Annotations regarding <literal>latin1</literal>:</emphasis>
- MySQL's <literal>latin1</literal> is the same as the Windows
- <literal>cp1252</literal> character set. This means it
- is the same as the official IANA (Internet Assigned Numbers Authority)
- <literal>latin1</literal>, but IANA <literal>latin1</literal> treats
- the code points between 0x80 and 0x9f as <quote>unused</quote>, while
- <literal>cp1252</literal>, and therefore MySQL's <literal>latin1</literal>,
- assign characters for those positions. For example, 0x80 is the Euro sign.
+ <emphasis>Annotations regarding
+ <literal>latin1</literal>:</emphasis> MySQL's
+ <literal>latin1</literal> is the same as the Windows
+ <literal>cp1252</literal> character set. This means it is the
+ same as the official IANA (Internet Assigned Numbers Authority)
+ <literal>latin1</literal>, but IANA <literal>latin1</literal>
+ treats the code points between 0x80 and 0x9f as
+ <quote>unused</quote>, while <literal>cp1252</literal>, and
+ therefore MySQL's <literal>latin1</literal>, assign characters
+ for those positions. For example, 0x80 is the Euro sign.
</para>
-
+
</section>
<section id="charset-ce-sets">
@@ -2858,6 +2860,12 @@
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>cp1250_polish_ci</literal>
+ </para>
+ </listitem>
+
</itemizedlist>
</listitem>
Modified: trunk/refman-common/news-5.1.xml
===================================================================
--- trunk/refman-common/news-5.1.xml 2005-12-06 16:44:26 UTC (rev 499)
+++ trunk/refman-common/news-5.1.xml 2005-12-06 18:03:52 UTC (rev 500)
@@ -45,10 +45,17 @@
Functionality added or changed:
</para>
- <remark>
- ADD AN ITEMIZED LIST WHEN WE HAVE SOME ITEMS THAT GO HERE
- </remark>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Added the <literal>cp1250_polish_ci</literal> collation for
+ the <literal>cp1250</literal> character set.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
<para>
Bugs fixed:
</para>
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 15
- bk commit into 5.0 tree (bell:1.1851)Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell 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.1851 05/05/18 16:54:57 email***@***.com +2 -0
Merge book.sanja.is.com.ua:/Users/bell/mysql/bk/mysql-5.0
into book.sanja.is.com.ua:/Users/bell/mysql/bk/work-bug2-5.0
sql/item.cc
1.119 05/05/18 16:54:51 email***@***.com +0 -0
Auto merged
BitKeeper/etc/logging_ok
1.315 05/05/18 16:54:22 email***@***.com +0 -0
auto-union
# 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: bell
# Host: book.sanja.is.com.ua
# Root: /Users/bell/mysql/bk/work-bug2-5.0/RESYNC
--- 1.118/sql/item.cc 2005-05-16 16:34:34 +03:00
+++ 1.119/sql/item.cc 2005-05-18 16:54:51 +03:00
@@ -3554,7 +3554,7 @@
Item *Item_int_with_ref::new_item()
{
- DBUG_ASSERT(ref->basic_const_item());
+ DBUG_ASSERT(ref->const_item());
/*
We need to evaluate the constant to make sure it works with
parameter markers.
--- 1.314/BitKeeper/etc/logging_ok 2005-05-17 23:38:18 +03:00
+++ 1.315/BitKeeper/etc/logging_ok 2005-05-18 16:54:22 +03:00
@@ -243,6 +243,8 @@
email***@***.com
email***@***.com
email***@***.com
+email***@***.com
+email***@***.com
email***@***.com
email***@***.com
email***@***.com
--
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 5.0 tree (acurtis:1.2018) BUG#5892Below is the list of changes that have just been committed into a local
5.0 repository of antony. When antony 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.2018 05/07/02 05:11:51 email***@***.com +23 -0
Bug#5892/6182/8751/8758/10994
"Triggers have the wrong namespace"
"Triggers: duplicate names allowed"
"Triggers: CREATE TRIGGER does not accept fully qualified names"
"SHOW TRIGGERS"
BitKeeper/etc/config
1.12 05/07/02 05:10:51 email***@***.com +2 -1
logging none
sql/table.h
1.101 05/07/02 05:07:21 email***@***.com +1 -1
new information schema view TRIGGERS
sql/sql_yacc.yy
1.402 05/07/02 05:07:21 email***@***.com +25 -7
allow schema name for trigger in CREATE TRIGGER stmt.
DROP TRIGGER now uses schema name instead of table name.
new command SHOW TRIGGERS
sql/sql_trigger.h
1.9 05/07/02 05:07:21 email***@***.com +10 -0
new methods drop_all_triggers, get_trigger_info
new functions mysql_drop_all_triggers, mysql_table_for_trigger
sql/sql_trigger.cc
1.19 05/07/02 05:07:20 email***@***.com +286 -0
new global trigname_file_ext
trigger names now have schema scope
new methods drop_all_triggers, get_trigger_info
new functions mysql_drop_all_triggers, mysql_table_for_trigger
sql/sql_table.cc
1.254 05/07/02 05:07:20 email***@***.com +10 -12
drop triggers when dropping table
sql/sql_show.cc
1.255 05/07/02 05:07:20 email***@***.com +105 -0
new information schema view TRIGGERS
sql/sql_parse.cc
1.460 05/07/02 05:07:20 email***@***.com +1 -0
new infomation schema view, TRIGGERS
sql/sql_lex.h
1.187 05/07/02 05:07:20 email***@***.com +1 -0
SQLCOM_SHOW_TRIGGERS
sql/share/errmsg.txt
1.35 05/07/02 05:07:19 email***@***.com +4 -0
New error messages:
ER_TRG_IN_WRONG_SCHEMA
ER_WARN_TRG_DROP_FAILURE
sql/mysqld.cc
1.475 05/07/02 05:07:19 email***@***.com +1 -0
status var Com_show_triggers
sql/mysql_priv.h
1.319 05/07/02 05:07:19 email***@***.com +1 -0
new global trigname_file_ext
sql/lex.h
1.137 05/07/02 05:07:19 email***@***.com +1 -0
new keyword TRIGGERS
sql/item.h
1.145 05/07/02 05:07:18 email***@***.com +2 -2
add TRG_ACTION_MAX and TRG_EVENT_MAX
sql/handler.cc
1.176 05/07/02 05:07:18 email***@***.com +1 -0
add trigger instance name ext ".TRI" to known extensions
mysql-test/t/view.test
1.76 05/07/02 05:07:18 email***@***.com +1 -1
triggers now have schema scope
mysql-test/t/trigger.test
1.12 05/07/02 05:07:18 email***@***.com +37 -18
triggers now have schema scope
mysql-test/t/rpl_sp.test
1.4 05/07/02 05:07:18 email***@***.com +1 -1
triggers now have schema scope
mysql-test/r/view.result
1.88 05/07/02 05:07:18 email***@***.com +1 -1
triggers now have schema scope
mysql-test/r/trigger.result
1.8 05/07/02 05:07:18 email***@***.com +32 -17
triggers now have schema scope
mysql-test/r/rpl_sp.result
1.5 05/07/02 05:07:18 email***@***.com +2 -2
triggers now have schema scope
mysql-test/r/information_schema_db.result
1.3 05/07/02 05:07:18 email***@***.com +2 -0
new information schema view TRIGGERS
mysql-test/r/information_schema.result
1.58 05/07/02 05:07:17 email***@***.com +12 -2
new information schema view TRIGGERS
# 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: acurtis
# Host: ltantony.xiphis.org
# Root: /usr/home/antony/work2/p2-bug5892.1
--- 1.175/sql/handler.cc 2005-06-17 22:14:27 +01:00
+++ 1.176/sql/handler.cc 2005-07-02 05:07:18 +01:00
@@ -2441,6 +2441,7 @@
known_extensions_id= mysys_usage_id;
found_exts.push_back((char*) triggers_file_ext);
+ found_exts.push_back((char*) trigname_file_ext);
for (types= sys_table_types; types->type; types++)
{
if (*types->value == SHOW_OPTION_YES)
--- 1.144/sql/item.h 2005-06-22 21:56:00 +01:00
+++ 1.145/sql/item.h 2005-07-02 05:07:18 +01:00
@@ -1646,7 +1646,7 @@
*/
enum trg_action_time_type
{
- TRG_ACTION_BEFORE= 0, TRG_ACTION_AFTER= 1
+ TRG_ACTION_BEFORE= 0, TRG_ACTION_AFTER= 1, TRG_ACTION_MAX
};
/*
@@ -1654,7 +1654,7 @@
*/
enum trg_event_type
{
- TRG_EVENT_INSERT= 0 , TRG_EVENT_UPDATE= 1, TRG_EVENT_DELETE= 2
+ TRG_EVENT_INSERT= 0 , TRG_EVENT_UPDATE= 1, TRG_EVENT_DELETE= 2, TRG_EVENT_MAX
};
class Table_triggers_list;
--- 1.136/sql/lex.h 2005-02-25 18:19:00 +00:00
+++ 1.137/sql/lex.h 2005-07-02 05:07:19 +01:00
@@ -492,6 +492,7 @@
{ "TRAILING", SYM(TRAILING)},
{ "TRANSACTION", SYM(TRANSACTION_SYM)},
{ "TRIGGER", SYM(TRIGGER_SYM)},
+ { "TRIGGERS", SYM(TRIGGERS_SYM)},
{ "TRUE", SYM(TRUE_SYM)},
{ "TRUNCATE", SYM(TRUNCATE_SYM)},
{ "TYPE", SYM(TYPE_SYM)},
--- 1.318/sql/mysql_priv.h 2005-06-21 15:18:22 +01:00
+++ 1.319/sql/mysql_priv.h 2005-07-02 05:07:19 +01:00
@@ -1060,6 +1060,7 @@
extern const char *myisam_recover_options_str;
extern const char *in_left_expr_name, *in_additional_cond;
extern const char * const triggers_file_ext;
+extern const char * const trigname_file_ext;
extern Eq_creator eq_creator;
extern Ne_creator ne_creator;
extern Gt_creator gt_creator;
--- 1.474/sql/mysqld.cc 2005-06-22 10:11:18 +01:00
+++ 1.475/sql/mysqld.cc 2005-07-02 05:07:19 +01:00
@@ -5722,6 +5722,7 @@
{"Com_show_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS]), SHOW_LONG_STATUS},
{"Com_show_storage_engines", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STORAGE_ENGINES]), SHOW_LONG_STATUS},
{"Com_show_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLES]), SHOW_LONG_STATUS},
+ {"Com_show_triggers", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TRIGGERS]), SHOW_LONG_STATUS},
{"Com_show_variables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_VARIABLES]), SHOW_LONG_STATUS},
{"Com_show_warnings", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_WARNS]), SHOW_LONG_STATUS},
{"Com_slave_start", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SLAVE_START]), SHOW_LONG_STATUS},
--- 1.186/sql/sql_lex.h 2005-06-24 19:48:06 +01:00
+++ 1.187/sql/sql_lex.h 2005-07-02 05:07:20 +01:00
@@ -57,6 +57,7 @@
SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT,
SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS,
SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS,
+ SQLCOM_SHOW_TRIGGERS,
SQLCOM_LOAD,SQLCOM_SET_OPTION,SQLCOM_LOCK_TABLES,SQLCOM_UNLOCK_TABLES,
SQLCOM_GRANT,
--- 1.459/sql/sql_parse.cc 2005-06-23 18:06:52 +01:00
+++ 1.460/sql/sql_parse.cc 2005-07-02 05:07:20 +01:00
@@ -2104,6 +2104,7 @@
case SCH_TABLE_NAMES:
case SCH_TABLES:
case SCH_VIEWS:
+ case SCH_TRIGGERS:
#ifdef DONT_ALLOW_SHOW_COMMANDS
my_message(ER_NOT_ALLOWED_COMMAND,
ER(ER_NOT_ALLOWED_COMMAND), MYF(0)); /* purecov: inspected */
--- 1.254/sql/sql_show.cc 2005-06-22 10:08:22 +01:00
+++ 1.255/sql/sql_show.cc 2005-07-02 05:07:20 +01:00
@@ -21,6 +21,7 @@
#include "sql_select.h" // For select_describe
#include "repl_failsafe.h"
#include "sp_head.h"
+#include "sql_trigger.h"
#include <my_dir.h>
#ifdef HAVE_BERKELEY_DB
@@ -1687,6 +1688,7 @@
break;
case SQLCOM_SHOW_TABLES:
case SQLCOM_SHOW_TABLE_STATUS:
+ case SQLCOM_SHOW_TRIGGERS:
index_field_values->db_value= lex->current_select->db;
index_field_values->table_value= wild;
break;
@@ -2954,6 +2956,84 @@
}
+static const char *trg_timing_type_name[]= {"BEFORE", "AFTER"};
+static const int trg_timing_type_length[]= {6, 5};
+static const char *trg_event_type_name[]= {"INSERT", "UPDATE", "DELETE"};
+static const int trg_event_type_length[]= {6, 6, 6};
+
+bool store_triggers(THD *thd, TABLE *table, const char *db,
+ const char *tname, LEX_STRING *trigger_name,
+ enum trg_event_type event,
+ enum trg_action_time_type timing,
+ int order,
+ LEX_STRING *trigger_stmt,
+ TIME *created)
+{
+ TIME time;
+ CHARSET_INFO *cs= system_charset_info;
+ restore_record(table, s->default_values);
+ table->field[1]->store(db, strlen(db), cs);
+ table->field[2]->store(trigger_name->str, trigger_name->length, cs);
+ table->field[3]->store(trg_event_type_name[event],
+ trg_event_type_length[event], cs);
+ table->field[5]->store(db, strlen(db), cs);
+ table->field[6]->store(tname, strlen(tname), cs);
+ table->field[7]->store((longlong)order);
+ table->field[9]->store(trigger_stmt->str, trigger_stmt->length, cs);
+ table->field[10]->store("ROW", 3, cs);
+ table->field[11]->store(trg_timing_type_name[timing],
+ trg_timing_type_length[timing], cs);
+ table->field[16]->store_time(created, MYSQL_TIMESTAMP_DATETIME);
+ return schema_table_store_record(thd, table);
+}
+
+
+static int get_schema_triggers_record(THD *thd, struct st_table_list *tables,
+ TABLE *table, bool res,
+ const char *base_name,
+ const char *file_name)
+{
+ DBUG_ENTER("get_schema_constraints_record");
+ if (res)
+ {
+ if (!tables->view)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ thd->net.last_errno, thd->net.last_error);
+ thd->clear_error();
+ DBUG_RETURN(0);
+ }
+ else if (!tables->view && tables->table->triggers)
+ {
+ Table_triggers_list *triggers= tables->table->triggers;
+ int event, timing, order;
+ for (event= TRG_EVENT_INSERT; event < TRG_EVENT_MAX; event++)
+ {
+ for (timing= TRG_ACTION_BEFORE; timing < TRG_ACTION_MAX; timing++)
+ {
+ /* change this following line when we support more than 1 trigger */
+ for (order= 0; order < 1; order++)
+ {
+ LEX_STRING trigger_name;
+ LEX_STRING trigger_stmt;
+ TIME created;
+ if (triggers->get_trigger_info(thd, (enum trg_event_type) event,
+ (enum trg_action_time_type)timing,
+ order, &trigger_name, &trigger_stmt,
+ &created))
+ break;
+ if (store_triggers(thd, table, base_name, file_name, &trigger_name,
+ (enum trg_event_type) event,
+ (enum trg_action_time_type) timing, order,
+ &trigger_stmt, &created))
+ DBUG_RETURN(1);
+ }
+ }
+ }
+ }
+ DBUG_RETURN(res);
+}
+
+
void store_key_column_usage(TABLE *table, const char*db, const char *tname,
const char *key_name, uint key_len,
const char *con_type, uint con_len, longlong idx)
@@ -3823,6 +3903,29 @@
};
+ST_FIELD_INFO triggers_fields_info[]=
+{
+ {"TRIGGER_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"TRIGGER_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"TRIGGER_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Trigger"},
+ {"EVENT_MANIPULATION", 6, MYSQL_TYPE_STRING, 0, 0, "Event"},
+ {"EVENT_OBJECT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"EVENT_OBJECT_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"EVENT_OBJECT_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"},
+ {"ACTION_ORDER", 4, MYSQL_TYPE_LONG, 0, 0, 0},
+ {"ACTION_CONDITION", 65536, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"ACTION_STATEMENT", 65536, MYSQL_TYPE_STRING, 0, 0, "Statement"},
+ {"ACTION_ORIENTATION", 9, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"ACTION_TIMING", 6, MYSQL_TYPE_STRING, 0, 0, "Timing"},
+ {"ACTION_REFERENCE_OLD_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"ACTION_REFERENCE_NEW_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"ACTION_REFERENCE_OLD_ROW", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"ACTION_REFERENCE_NEW_ROW", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, "Created"},
+ {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
+};
+
+
ST_FIELD_INFO variables_fields_info[]=
{
{"Variable_name", 80, MYSQL_TYPE_STRING, 0, 0, "Variable_name"},
@@ -3873,6 +3976,8 @@
fill_open_tables, make_old_format, 0, -1, -1, 1},
{"STATUS", variables_fields_info, create_schema_table, fill_status,
make_old_format, 0, -1, -1, 1},
+ {"TRIGGERS", triggers_fields_info, create_schema_table,
+ get_all_tables, make_old_format, get_schema_triggers_record, 1, 2, 0},
{"VARIABLES", variables_fields_info, create_schema_table, fill_variables,
make_old_format, 0, -1, -1, 1},
{0, 0, 0, 0, 0, 0, 0, 0, 0}
--- 1.253/sql/sql_table.cc 2005-06-17 22:14:28 +01:00
+++ 1.254/sql/sql_table.cc 2005-07-02 05:07:20 +01:00
@@ -23,6 +23,7 @@
#include <hash.h>
#include <myisam.h>
#include <my_dir.h>
+#include "sql_trigger.h"
#ifdef __WIN__
#include <io.h>
@@ -271,6 +272,15 @@
{
char *end;
db_type table_type= get_table_type(thd, path);
+
+ if (mysql_drop_all_triggers(thd, db, table->table_name))
+ {
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_WARN_TRG_DROP_FAILURE,
+ ER(ER_WARN_TRG_DROP_FAILURE),
+ db, table->table_name);
+ }
+
*(end=fn_ext(path))=0; // Remove extension for delete
error= ha_delete_table(thd, table_type, path, table->table_name,
!dont_log_query);
@@ -287,19 +297,7 @@
/* Delete the table definition file */
strmov(end,reg_ext);
if (!(new_error=my_delete(path,MYF(MY_WME))))
- {
some_tables_deleted=1;
- /*
- Destroy triggers for this table if there are any.
-
- We won't need this as soon as we will have new .FRM format,
- in which we will store trigger definitions in the same .FRM
- files as table descriptions.
- */
- strmov(end, triggers_file_ext);
- if (!access(path, F_OK))
- new_error= my_delete(path, MYF(MY_WME));
- }
error|= new_error;
}
}
--- 1.401/sql/sql_yacc.yy 2005-06-22 22:02:41 +01:00
+++ 1.402/sql/sql_yacc.yy 2005-07-02 05:07:21 +01:00
@@ -38,6 +38,7 @@
#include "sp_pcontext.h"
#include "sp_rcontext.h"
#include "sp.h"
+#include "sql_trigger.h"
#include <myisam.h>
#include <myisammrg.h>
@@ -598,6 +599,7 @@
%token TRAILING
%token TRANSACTION_SYM
%token TRIGGER_SYM
+%token TRIGGERS_SYM
%token TRIM
%token TRUE_SYM
%token TRUNCATE_SYM
@@ -1266,7 +1268,7 @@
}
opt_view_list AS select_init check_option
{}
- | CREATE TRIGGER_SYM ident trg_action_time trg_event
+ | CREATE TRIGGER_SYM sp_name trg_action_time trg_event
ON table_ident FOR_SYM EACH_SYM ROW_SYM
{
LEX *lex= Lex;
@@ -1295,7 +1297,7 @@
bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
lex->sphead->m_chistics= &lex->sp_chistics;
- lex->sphead->m_body_begin= lex->tok_start;
+ lex->sphead->m_body_begin= lex->ptr;
}
sp_proc_stmt
{
@@ -1303,13 +1305,14 @@
sp_head *sp= lex->sphead;
lex->sql_command= SQLCOM_CREATE_TRIGGER;
- sp->init_strings(YYTHD, lex, NULL);
+ sp->init_strings(YYTHD, lex, $3);
/* Restore flag if it was cleared above */
if (sp->m_old_cmq)
YYTHD->client_capabilities |= CLIENT_MULTI_QUERIES;
sp->restore_thd_mem_root(YYTHD);
- lex->ident= $3;
+ lex->name= $3->m_db.str;
+ lex->ident= $3->m_name;
/*
We have to do it after parsing trigger body, because some of
@@ -5872,19 +5875,24 @@
lex->sql_command= SQLCOM_DROP_VIEW;
lex->drop_if_exists= $3;
}
- | DROP TRIGGER_SYM ident '.' ident
+ | DROP TRIGGER_SYM sp_name
{
LEX *lex= Lex;
+ Table_ident *table;
+
+ if (!(table= mysql_table_for_trigger(YYTHD, $3, 0)))
+ YYABORT;
lex->sql_command= SQLCOM_DROP_TRIGGER;
/* QQ: Could we loosen lock type in certain cases ? */
if (!lex->select_lex.add_table_to_list(YYTHD,
- new Table_ident($3),
+ table,
(LEX_STRING*) 0,
TL_OPTION_UPDATING,
TL_WRITE))
YYABORT;
- lex->ident= $5;
+ lex->ident= $3->m_name;
+ lex->name= $3->m_db.str;
}
;
@@ -6266,6 +6274,15 @@
if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES))
YYABORT;
}
+ | opt_full TRIGGERS_SYM opt_db wild_and_where
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SELECT;
+ lex->orig_sql_command= SQLCOM_SHOW_TRIGGERS;
+ lex->select_lex.db= $3;
+ if (prepare_schema_table(YYTHD, lex, 0, SCH_TRIGGERS))
+ YYABORT;
+ }
| TABLE_SYM STATUS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
@@ -7542,6 +7559,7 @@
| TEMPTABLE_SYM {}
| TEXT_SYM {}
| TRANSACTION_SYM {}
+ | TRIGGERS_SYM {}
| TRUNCATE_SYM {}
| TIMESTAMP {}
| TIMESTAMP_ADD {}
--- 1.100/sql/table.h 2005-06-01 14:35:04 +01:00
+++ 1.101/sql/table.h 2005-07-02 05:07:21 +01:00
@@ -275,7 +275,7 @@
SCH_COLLATION_CHARACTER_SET_APPLICABILITY, SCH_PROCEDURES, SCH_STATISTICS,
SCH_VIEWS, SCH_USER_PRIVILEGES, SCH_SCHEMA_PRIVILEGES, SCH_TABLE_PRIVILEGES,
SCH_COLUMN_PRIVILEGES, SCH_TABLE_CONSTRAINTS, SCH_KEY_COLUMN_USAGE,
- SCH_TABLE_NAMES, SCH_OPEN_TABLES, SCH_STATUS, SCH_VARIABLES
+ SCH_TABLE_NAMES, SCH_OPEN_TABLES, SCH_STATUS, SCH_TRIGGERS, SCH_VARIABLES
};
--- 1.34/sql/share/errmsg.txt 2005-06-20 12:38:09 +01:00
+++ 1.35/sql/share/errmsg.txt 2005-07-02 05:07:19 +01:00
@@ -5358,3 +5358,7 @@
eng "The statement (%lu) has no open cursor."
ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
eng "Explicit or implicit commit is not allowed in stored function or trigger."
+ER_TRG_IN_WRONG_SCHEMA
+ eng "Trigger in wrong schema"
+ER_WARN_TRG_DROP_FAILURE
+ eng "An error occuring while dropping triggers for '%-.64s.%-.64s'"
--- 1.87/mysql-test/r/view.result 2005-06-24 18:47:16 +01:00
+++ 1.88/mysql-test/r/view.result 2005-07-02 05:07:18 +01:00
@@ -1245,7 +1245,7 @@
s1
select * from t1;
s1
-drop trigger t1.t1_bi;
+drop trigger t1_bi;
drop view v1;
drop table t1;
create table t1 (s1 tinyint);
--- 1.75/mysql-test/t/view.test 2005-06-24 18:47:16 +01:00
+++ 1.76/mysql-test/t/view.test 2005-07-02 05:07:18 +01:00
@@ -1183,7 +1183,7 @@
insert into v1 values (0);
select * from v1;
select * from t1;
-drop trigger t1.t1_bi;
+drop trigger t1_bi;
drop view v1;
drop table t1;
--- 1.11/BitKeeper/etc/config 2005-05-13 08:34:57 +01:00
+++ 1.12/BitKeeper/etc/config 2005-07-02 05:10:51 +01:00
@@ -24,7 +24,8 @@
# repository is commercial it can be an internal email address or "none"
# to disable logging.
#
-logging: email***@***.com
+#logging: email***@***.com
+logging: none
#
# If this field is set, all checkins will appear to be made by this user,
# in effect making this a single user package. Single user packages are
--- 1.7/mysql-test/r/trigger.result 2005-05-30 15:55:52 +01:00
+++ 1.8/mysql-test/r/trigger.result 2005-07-02 05:07:18 +01:00
@@ -11,13 +11,13 @@
select @a;
@a
1
-drop trigger t1.trg;
+drop trigger trg;
create trigger trg before insert on t1 for each row set @a:=new.i;
insert into t1 values (123);
select @a;
@a
123
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
create table t1 (i int not null, j int);
create trigger trg before insert on t1 for each row
@@ -32,7 +32,7 @@
i j
1 10
2 3
-drop trigger t1.trg|
+drop trigger trg|
drop table t1|
create table t1 (i int not null primary key);
create trigger trg after insert on t1 for each row
@@ -42,7 +42,7 @@
select @a;
@a
2:3:4:5
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
create table t1 (aid int not null primary key, balance int not null default 0);
insert into t1 values (1, 1000), (2,3000);
@@ -64,7 +64,7 @@
aid balance
1 1500
2 3000
-drop trigger t1.trg|
+drop trigger trg|
drop table t1|
create table t1 (i int);
insert into t1 values (1),(2),(3),(4);
@@ -75,7 +75,7 @@
select @total_change;
@total_change
2
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
create table t1 (i int);
insert into t1 values (1),(2),(3),(4);
@@ -86,7 +86,7 @@
select @del_sum;
@del_sum
6
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
create table t1 (i int);
insert into t1 values (1),(2),(3),(4);
@@ -96,7 +96,7 @@
select @del;
@del
1
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row
@@ -136,9 +136,9 @@
1 20
2 -1
3 20
-drop trigger t1.trg1;
-drop trigger t1.trg2;
-drop trigger t1.trg3;
+drop trigger trg1;
+drop trigger trg2;
+drop trigger trg3;
drop table t1;
create table t1 (id int not null primary key, data int);
create trigger t1_bi before insert on t1 for each row
@@ -183,6 +183,7 @@
(BEFORE_INSERT: new=(id=1, data=5))(BEFORE_UPDATE: old=(id=1, data=4) new=(id=1, data=6))(AFTER_UPDATE: old=(id=1, data=4) new=(id=1, data=6))(BEFORE_INSERT: new=(id=3, data=3))(AFTER_INSERT: new=(id=3, data=3))
drop table t1;
create table t1 (i int);
+create table t3 (i int);
create trigger trg before insert on t1 for each row set @a:= old.i;
ERROR HY000: There is no OLD row in on INSERT trigger
create trigger trg before delete on t1 for each row set @a:= new.i;
@@ -204,14 +205,19 @@
ERROR HY000: Trigger already exists
create trigger trg2 before insert on t1 for each row set @a:=1;
ERROR HY000: Trigger already exists
-drop trigger t1.trg;
-drop trigger t1.trg;
+create trigger trg before insert on t3 for each row set @a:=1;
+ERROR HY000: Trigger already exists
+create trigger trg2 before insert on t3 for each row set @a:=1;
+drop trigger trg2;
+drop trigger trg;
+drop trigger trg;
ERROR HY000: Trigger does not exist
create view v1 as select * from t1;
create trigger trg before insert on v1 for each row set @a:=1;
ERROR HY000: Trigger's 'v1' is view or temporary table
drop view v1;
drop table t1;
+drop table t3;
create temporary table t1 (i int);
create trigger trg before insert on t1 for each row set @a:=1;
ERROR HY000: Trigger's 't1' is view or temporary table
@@ -219,7 +225,7 @@
create table t1 (x1col char);
create trigger tx1 before insert on t1 for each row set new.x1col = 'x';
insert into t1 values ('y');
-drop trigger t1.tx1;
+drop trigger tx1;
drop table t1;
create table t1 (i int) engine=myisam;
insert into t1 values (1), (2);
@@ -230,8 +236,8 @@
select @del_before, @del_after;
@del_before @del_after
3 3
-drop trigger t1.trg1;
-drop trigger t1.trg2;
+drop trigger trg1;
+drop trigger trg2;
drop table t1;
create table t1 (a int);
create trigger trg1 before insert on t1 for each row set new.a= 10;
@@ -248,6 +254,15 @@
create trigger trg1 before insert on t1 for each row set @a:= 1;
drop database mysqltest;
use test;
+create database mysqltest;
+create table mysqltest.t1 (i int);
+create trigger trg1 before insert on mysqltest.t1 for each row set @a:= 1;
+ERROR HY000: Trigger in wrong schema
+use mysqltest;
+create trigger test.trg1 before insert on t1 for each row set @a:= 1;
+ERROR HY000: Trigger in wrong schema
+drop database mysqltest;
+use test;
create table t1 (i int, j int default 10, k int not null, key (k));
create table t2 (i int);
insert into t1 (i, k) values (1, 1);
@@ -461,7 +476,7 @@
1 1
2 2
alter table t1 add primary key (i);
-drop trigger t1.bi;
+drop trigger bi;
insert into t1 values (2, 4) on duplicate key update k= k + 10;
ERROR 42S22: Unknown column 'bt' in 'NEW'
select * from t1;
--- 1.11/mysql-test/t/trigger.test 2005-05-30 15:55:52 +01:00
+++ 1.12/mysql-test/t/trigger.test 2005-07-02 05:07:18 +01:00
@@ -16,13 +16,13 @@
select @a;
insert into t1 values (1);
select @a;
-drop trigger t1.trg;
+drop trigger trg;
# let us test simple trigger reading some values
create trigger trg before insert on t1 for each row set @a:=new.i;
insert into t1 values (123);
select @a;
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
@@ -39,7 +39,7 @@
insert into t1 (i) values (1)|
insert into t1 (i,j) values (2, 3)|
select * from t1|
-drop trigger t1.trg|
+drop trigger trg|
drop table t1|
delimiter ;|
@@ -51,7 +51,7 @@
set @a:="";
insert into t1 values (2),(3),(4),(5);
select @a;
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
# PS doesn't work with multi-row statements
@@ -74,7 +74,7 @@
update t1 set balance=1500|
select @update_failed;
select * from t1|
-drop trigger t1.trg|
+drop trigger trg|
drop table t1|
delimiter ;|
--enable_ps_protocol
@@ -87,7 +87,7 @@
set @total_change:=0;
update t1 set i=3;
select @total_change;
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
# Before delete trigger
@@ -99,7 +99,7 @@
set @del_sum:= 0;
delete from t1 where i <= 3;
select @del_sum;
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
# After delete trigger.
@@ -110,7 +110,7 @@
set @del:= 0;
delete from t1 where i <> 0;
select @del;
-drop trigger t1.trg;
+drop trigger trg;
drop table t1;
# Several triggers on one table
@@ -144,9 +144,9 @@
select @fired;
select * from t1;
-drop trigger t1.trg1;
-drop trigger t1.trg2;
-drop trigger t1.trg3;
+drop trigger trg1;
+drop trigger trg2;
+drop trigger trg3;
drop table t1;
@@ -203,6 +203,7 @@
# Test of wrong column specifiers in triggers
#
create table t1 (i int);
+create table t3 (i int);
--error 1363
create trigger trg before insert on t1 for each row set @a:= old.i;
@@ -222,7 +223,7 @@
#
# Let us test various trigger creation errors
-#
+# Also quickly test table namespace (bug#5892/6182)
#
--error 1146
create trigger trg before insert on t2 for each row set @a:=1;
@@ -232,10 +233,14 @@
create trigger trg after insert on t1 for each row set @a:=1;
--error 1359
create trigger trg2 before insert on t1 for each row set @a:=1;
-drop trigger t1.trg;
+--error 1359
+create trigger trg before insert on t3 for each row set @a:=1;
+create trigger trg2 before insert on t3 for each row set @a:=1;
+drop trigger trg2;
+drop trigger trg;
--error 1360
-drop trigger t1.trg;
+drop trigger trg;
create view v1 as select * from t1;
--error 1361
@@ -243,6 +248,7 @@
drop view v1;
drop table t1;
+drop table t3;
create temporary table t1 (i int);
--error 1361
@@ -260,7 +266,7 @@
create table t1 (x1col char);
create trigger tx1 before insert on t1 for each row set new.x1col = 'x';
insert into t1 values ('y');
-drop trigger t1.tx1;
+drop trigger tx1;
drop table t1;
#
@@ -276,8 +282,8 @@
set @del_before:=0, @del_after:= 0;
delete from t1;
select @del_before, @del_after;
-drop trigger t1.trg1;
-drop trigger t1.trg2;
+drop trigger trg1;
+drop trigger trg2;
drop table t1;
# Test for bug #5859 "DROP TABLE does not drop triggers". Trigger should not
@@ -299,6 +305,19 @@
drop database mysqltest;
use test;
+# Test for bug #8791
+# "Triggers: Allowed to create triggers on a subject table in a different DB".
+create database mysqltest;
+create table mysqltest.t1 (i int);
+--error 1423
+create trigger trg1 before insert on mysqltest.t1 for each row set @a:= 1;
+use mysqltest;
+--error 1423
+create trigger test.trg1 before insert on t1 for each row set @a:= 1;
+drop database mysqltest;
+use test;
+
+
# Test for bug #5860 "Multi-table UPDATE does not activate update triggers"
# We will also test how delete triggers wor for multi-table DELETE.
create table t1 (i int, j int default 10, k int not null, key (k));
@@ -480,7 +499,7 @@
# To test properly code-paths different from those that are used
# in ordinary INSERT we need to drop "before insert" trigger.
alter table t1 add primary key (i);
-drop trigger t1.bi;
+drop trigger bi;
--error 1054
insert into t1 values (2, 4) on duplicate key update k= k + 10;
select * from t1;
--- 1.18/sql/sql_trigger.cc 2005-05-24 19:19:28 +01:00
+++ 1.19/sql/sql_trigger.cc 2005-07-02 05:07:20 +01:00
@@ -1,4 +1,5 @@
#include "mysql_priv.h"
+#include <my_dir.h>
#include "sp_head.h"
#include "sql_trigger.h"
#include "parse_file.h"
@@ -6,6 +7,7 @@
static const LEX_STRING triggers_file_type= {(char *)"TRIGGERS", 8};
const char * const triggers_file_ext= ".TRG";
+const char * const trigname_file_ext= ".TRI";
/*
Table of .TRG file field descriptors.
@@ -42,8 +44,10 @@
*/
bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
{
+ char path[FN_REFLEN+1];
TABLE *table;
bool result= 0;
+ int fd= -1;
DBUG_ENTER("mysql_create_or_drop_trigger");
@@ -77,6 +81,16 @@
DBUG_RETURN(TRUE);
}
+ /*
+ Trigger must be in the same schema as target table
+ */
+ if (my_strcasecmp(system_charset_info, table->s->db,
+ thd->lex->name ? thd->lex->name : thd->db))
+ {
+ my_error(create ? ER_TRG_IN_WRONG_SCHEMA : ER_TRG_DOES_NOT_EXIST, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+
if (!table->triggers)
{
if (!create)
@@ -114,10 +128,42 @@
}
VOID(pthread_mutex_lock(&LOCK_open));
+
+ /*
+ Use the filesystem to enforce trigger namespace constraints
+ */
+ if (fn_format_relative_to_data_home(path, thd->lex->ident.str,
+ table->s->db, trigname_file_ext) ||
+ (create && (fd= my_create(path, 0666, O_WRONLY|O_EXCL,MYF(0))) < 0))
+ {
+ VOID(pthread_mutex_unlock(&LOCK_open));
+ my_message(ER_TRG_ALREADY_EXISTS, ER(ER_TRG_ALREADY_EXISTS), MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+ if (create)
+ {
+ int len= strlen(table->s->table_name);
+ if (my_write(fd,(byte*)table->s->table_name, len, MYF(MYF_RW)))
+ {
+ my_close(fd,MYF(0));
+ my_delete(path, MYF(0));
+ VOID(pthread_mutex_unlock(&LOCK_open));
+ DBUG_RETURN(TRUE);
+ }
+ my_close(fd,MYF(0));
+ }
+
result= (create ?
table->triggers->create_trigger(thd, tables):
table->triggers->drop_trigger(thd, tables));
+ if (((create && result) || (!create && !result)) &&
+ my_delete(path, MYF(0)))
+ {
+ sql_print_warning("Could not delete trigger file: '%s', error: %d",
+ path, my_errno);
+ }
+
/* It is sensible to invalidate table in any case */
close_cached_table(thd, table);
VOID(pthread_mutex_unlock(&LOCK_open));
@@ -506,4 +552,244 @@
}
DBUG_RETURN(1);
+}
+
+
+/*
+ Drop all triggers for table.
+
+ SYNOPSIS
+ drop_all_triggers()
+ thd - current thread context (including trigger definition in LEX)
+ tables - table list containing one open table for which trigger is
+ dropped.
+
+ RETURN VALUE
+ False - success
+ True - error
+*/
+bool Table_triggers_list::drop_all_triggers(THD *thd, TABLE_LIST *tables)
+{
+ TABLE *table= tables->table;
+ LEX_STRING *name;
+ List_iterator_fast<LEX_STRING> it_name(names_list);
+ List_iterator<LEX_STRING> it_def(definitions_list);
+ char path[FN_REFLEN];
+
+ if (names_list.elements)
+ {
+ while ((name= it_name++))
+ {
+ int fd;
+
+ it_def++;
+ if (fn_format_relative_to_data_home(path, name->str,
+ table->s->db, trigname_file_ext) ||
+ (fd= my_open(path, O_RDONLY, MYF(0))) < 0)
+ {
+ sql_print_warning("Missing trigger file: '%s', error: %d",
+ path, my_errno);
+ }
+ else
+ {
+ char buff[FN_REFLEN+1];
+ int len= (int) my_read(fd, (byte*)buff, sizeof(buff)-1, MYF(0));
+ buff[len]= '\0';
+ my_close(fd,MYF(0));
+ if (my_strcasecmp(system_charset_info, buff, table->s->table_name))
+ {
+ sql_print_warning("Table '%s' has duplicate trigger name: '%s'",
+ table->s->table_name, name->str);
+ }
+ else
+ if (my_delete(path, MYF(0)))
+ {
+ sql_print_warning("Could not delete trigger file: '%s', error: %d",
+ path, my_errno);
+ }
+ }
+
+ /*
+ Again we don't care much about other things required for
+ clean trigger removing since table will be reopened anyway.
+ */
+ it_def.remove();
+ }
+
+ /*
+ TODO: Probably instead of removing .TRG file we should move
+ to archive directory but this should be done as part of
+ parse_file.cc functionality (because we will need it
+ elsewhere).
+ */
+ strxnmov(path, FN_REFLEN-1, mysql_data_home, "/", tables->db, "/",
+ tables->table_name, triggers_file_ext, NullS);
+ path[FN_REFLEN-1]= '\0';
+ unpack_filename(path, path);
+ return my_delete(path, MYF(MY_WME));
+ }
+ return 0;
+}
+
+
+bool Table_triggers_list::get_trigger_info(THD *thd, trg_event_type event,
+ trg_action_time_type time_type,
+ int trigger_order,
+ LEX_STRING *trigger_name,
+ LEX_STRING *trigger_stmt,
+ TIME *created)
+{
+ sp_head *body;
+ DBUG_ENTER("get_trigger_info");
+ if (trigger_order == 0 && (body= bodies[event][time_type]))
+ {
+ struct tm tmp_tm;
+ my_time_t time;
+ char path[FN_REFLEN+1];
+ MY_STAT stat_info;
+ int fd;
+
+ *trigger_name= body->m_name;
+ *trigger_stmt= body->m_body;
+ bzero(created, sizeof(TIME));
+
+ if (fn_format_relative_to_data_home(path, body->m_name.str,
+ body->m_db.str, trigname_file_ext) ||
+ (fd= my_open(path, O_RDONLY, MYF(0))) < 0)
+ {
+ sql_print_warning("Could not open trigger file: '%s', error: %d",
+ path, my_errno);
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_TRG_DOES_NOT_EXIST,
+ "Missing name file for trigger '%s'",
+ body->m_name.str);
+ }
+ else
+ {
+ char name[FN_REFLEN+1];
+ int len= (int) my_read(fd, (byte*)name, sizeof(name)-1, MYF(0));
+ my_close(fd,MYF(0));
+ name[len]= '\0';
+ if (my_strcasecmp(system_charset_info, name, table->s->table_name))
+ {
+ sql_print_warning("Table '%s' has duplicate trigger name: '%s'",
+ table->s->table_name, body->m_name.str);
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_TRG_DOES_NOT_EXIST,
+ "Table '%s' has duplicate trigger name: '%s'",
+ table->s->table_name, body->m_name.str);
+ }
+ else
+ {
+ my_stat(path, &stat_info, MYF(0));
+ gmtime_r(&stat_info.st_ctime, &tmp_tm);
+ localtime_to_TIME(created, &tmp_tm);
+ }
+ }
+ DBUG_RETURN(0);
+ }
+ DBUG_RETURN(1);
+}
+
+
+/*
+ Find table identifier from trigger identifier.
+
+ SYNOPSIS
+ mysql_table_for_trigger()
+ thd - current thread context
+ trig - identifier for trigger
+ no_error - set if this should not emit an error message
+
+ RETURN VALUE
+ 0 - error
+*/
+Table_ident *mysql_table_for_trigger(THD *thd, sp_name *trig, bool no_error)
+{
+ const char *db= !trig->m_db.str ? thd->db : trig->m_db.str;
+ char path[FN_REFLEN+1];
+ LEX_STRING name;
+ int fd;
+ DBUG_ENTER("mysql_table_for_trigger");
+
+ if (fn_format_relative_to_data_home(path, trig->m_name.str,
+ db, trigname_file_ext) ||
+ (fd= my_open(path, O_RDONLY, MYF(0))) < 0)
+ {
+ if (!no_error)
+ {
+ my_message(ER_TRG_DOES_NOT_EXIST, ER(ER_TRG_DOES_NOT_EXIST), MYF(0));
+ }
+ DBUG_RETURN(0);
+ }
+ name.length= (int) my_read(fd, (byte*)path, sizeof(path)-1, MYF(0));
+ path[name.length]= '\0';
+ name.str= thd->strdup(path);
+ my_close(fd,MYF(0));
+
+ return trig->m_db.str ?
+ new Table_ident(thd, trig->m_db, name, 0) :
+ new Table_ident(name);
+}
+
+
+/*
+ Drop all triggers for table.
+
+ SYNOPSIS
+ mysql_drop_all_triggers()
+ thd - current thread context
+ db - schema for table
+ name - name for table
+
+ NOTE
+ The calling thread should hold the LOCK_open mutex;
+
+ RETURN VALUE
+ False - success
+ True - error
+*/
+bool mysql_drop_all_triggers(THD *thd, char *db, char *name)
+{
+ TABLE_LIST table_list;
+ TABLE table;
+ char path[FN_REFLEN];
+ bool result= 0;
+ DBUG_ENTER("mysql_drop_all_triggers");
+
+ bzero(&table_list, sizeof(table_list));
+ bzero(&table, sizeof(table));
+ table_list.db= db;
+ table_list.table_name= table_list.alias= name;
+ table_list.table = &table;
+
+ strxnmov(path, sizeof(path)-1, mysql_data_home, "/", db, "/", name, NullS);
+ path[FN_REFLEN-1]= '\0';
+
+ safe_mutex_assert_owner(&LOCK_open);
+
+ if (openfrm(thd, path, name, HA_TRY_READ_ONLY | NO_ERR_ON_NEW_FRM,
+ COMPUTE_TYPES | EXTRA_RECORD, 0, &table))
+ {
+ DBUG_PRINT("info",("failed to load frm"));
+ goto end;
+ }
+ table.s->db= db;
+ if (Table_triggers_list::check_n_load(thd, db, name, &table))
+ {
+ DBUG_PRINT("info",("failed to load triggers"));
+ result= 1;
+ goto end;
+ }
+ if (table.s->tmp_table == NO_TMP_TABLE && table.triggers &&
+ table.triggers->drop_all_triggers(thd, &table_list))
+ {
+ DBUG_PRINT("info",("failed to drop triggers"));
+ result= 1;
+ goto end;
+ }
+ DBUG_PRINT("info",("dropped triggers for %s.%s",db,name));
+end:
+ intern_close_table(&table);
+ DBUG_RETURN(result);
}
--- 1.8/sql/sql_trigger.h 2005-06-07 11:53:03 +01:00
+++ 1.9/sql/sql_trigger.h 2005-07-02 05:07:21 +01:00
@@ -3,6 +3,7 @@
QQ: Will it be merged into TABLE in future ?
*/
+#ifdef _SP_HEAD_H_
class Table_triggers_list: public Sql_alloc
{
/* Triggers as SPs grouped by event, action_time */
@@ -45,6 +46,7 @@
bool create_trigger(THD *thd, TABLE_LIST *table);
bool drop_trigger(THD *thd, TABLE_LIST *table);
+ bool drop_all_triggers(THD *thd, TABLE_LIST *tables);
bool process_triggers(THD *thd, trg_event_type event,
trg_action_time_type time_type,
bool old_row_is_record1)
@@ -96,6 +98,10 @@
return res;
}
+ bool get_trigger_info(THD *thd, trg_event_type event,
+ trg_action_time_type time_type, int trigger_order,
+ LEX_STRING *trigger_name, LEX_STRING *trigger_stmt,
+ TIME *created);
static bool check_n_load(THD *thd, const char *db, const char *table_name,
TABLE *table);
@@ -116,3 +122,7 @@
private:
bool prepare_record1_accessors(TABLE *table);
};
+#endif /* _SP_HEAD_H_ */
+
+Table_ident *mysql_table_for_trigger(THD *thd, sp_name *trig, bool no_error);
+bool mysql_drop_all_triggers(THD *thd, char *db, char *name);
--- 1.4/mysql-test/r/rpl_sp.result 2005-06-19 16:39:02 +01:00
+++ 1.5/mysql-test/r/rpl_sp.result 2005-07-02 05:07:18 +01:00
@@ -237,7 +237,7 @@
a
10
delete from t1;
-drop trigger t1.trg;
+drop trigger trg;
insert into t1 values (1);
select * from t1;
a
@@ -248,7 +248,7 @@
master-bin.000002 # Query 1 # use `mysqltest1`; create trigger trg before insert on t1 for each row set new.a= 10
master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1)
master-bin.000002 # Query 1 # use `mysqltest1`; delete from t1
-master-bin.000002 # Query 1 # use `mysqltest1`; drop trigger t1.trg
+master-bin.000002 # Query 1 # use `mysqltest1`; drop trigger trg
master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1)
select * from t1;
a
--- 1.3/mysql-test/t/rpl_sp.test 2005-05-06 17:52:14 +01:00
+++ 1.4/mysql-test/t/rpl_sp.test 2005-07-02 05:07:18 +01:00
@@ -249,7 +249,7 @@
connection master;
delete from t1;
-drop trigger t1.trg;
+drop trigger trg;
insert into t1 values (1);
select * from t1;
--replace_column 2 # 5 #
--- 1.57/mysql-test/r/information_schema.result 2005-06-16 09:27:17 +01:00
+++ 1.58/mysql-test/r/information_schema.result 2005-07-02 05:07:17 +01:00
@@ -48,6 +48,7 @@
COLUMN_PRIVILEGES
TABLE_CONSTRAINTS
KEY_COLUMN_USAGE
+TRIGGERS
columns_priv
db
func
@@ -77,6 +78,7 @@
TABLES TABLES
TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
+TRIGGERS TRIGGERS
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
@@ -94,6 +96,7 @@
TABLES TABLES
TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
+TRIGGERS TRIGGERS
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
@@ -111,6 +114,7 @@
TABLES TABLES
TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
+TRIGGERS TRIGGERS
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
@@ -574,6 +578,7 @@
TABLES
TABLE_PRIVILEGES
TABLE_CONSTRAINTS
+TRIGGERS
create database information_schema;
ERROR HY000: Can't create database 'information_schema'; database exists
use information_schema;
@@ -582,6 +587,7 @@
TABLES TEMPORARY
TABLE_PRIVILEGES TEMPORARY
TABLE_CONSTRAINTS TEMPORARY
+TRIGGERS TEMPORARY
create table t1(a int);
ERROR 42S02: Unknown table 't1' in information_schema
use test;
@@ -593,6 +599,7 @@
TABLES
TABLE_PRIVILEGES
TABLE_CONSTRAINTS
+TRIGGERS
select table_name from tables where table_name='user';
table_name
user
@@ -687,7 +694,7 @@
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
count(*)
-100
+101
drop view a2, a1;
drop table t_crashme;
select table_schema,table_name, column_name from
@@ -698,6 +705,8 @@
information_schema ROUTINES ROUTINE_DEFINITION
information_schema ROUTINES SQL_MODE
information_schema VIEWS VIEW_DEFINITION
+information_schema TRIGGERS ACTION_CONDITION
+information_schema TRIGGERS ACTION_STATEMENT
select table_name, column_name, data_type from information_schema.columns
where data_type = 'datetime';
table_name column_name data_type
@@ -706,6 +715,7 @@
TABLES CHECK_TIME datetime
ROUTINES CREATED datetime
ROUTINES LAST_ALTERED datetime
+TRIGGERS CREATED datetime
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES A
WHERE NOT EXISTS
(SELECT * FROM INFORMATION_SCHEMA.COLUMNS B
@@ -751,7 +761,7 @@
flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
table_schema count(*)
-information_schema 15
+information_schema 16
mysql 17
create database mysqltest;
create table mysqltest.t1 (f1 int, f2 int);
--- 1.2/mysql-test/r/information_schema_db.result 2005-05-24 11:35:16 +01:00
+++ 1.3/mysql-test/r/information_schema_db.result 2005-07-02 05:07:18 +01:00
@@ -16,11 +16,13 @@
COLUMN_PRIVILEGES
TABLE_CONSTRAINTS
KEY_COLUMN_USAGE
+TRIGGERS
show tables from INFORMATION_SCHEMA like 'T%';
Tables_in_information_schema (T%)
TABLES
TABLE_PRIVILEGES
TABLE_CONSTRAINTS
+TRIGGERS
create database `inf%`;
use `inf%`;
show tables;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
|
| Author |
Message |
petervandijck

|
Posted: 2006-9-12 21:23:30 |
Top |
mysql, IN & ANY subqueries
Or perhaps add a TEXT index to the table?
Peter
On 9/6/06, Philippe Poelvoorde <email***@***.com> wrote:
> 2006/9/5, Ben Lachman <email***@***.com>:
> > So possibly a better solution would be to create a temporary table
> > and then do a subquery on that table?
>
> yes. Or do a :
> SELECT id FROM t1 WHERE name LIKE '%s1%' OR name LIKE %'s2%' OR name
> LIKE '%s3%'
> but depending on your data, a table may be the way to go.
>
> >
> > ->Ben
> >
> > On Sep 4, 2006, at 7:37 AM, Visolve DB Team wrote:
> >
> > > Hi
> > >
> > > The ANY keyword, which must follow a comparison operator, means
> > > "return TRUE if the comparison is TRUE for ANY of the values in the
> > > column that the subquery returns
> > >
> > > In has 2 forms:
> > > 1. IN (subquery). [The word IN is an alias for = ANY (subquery)].
> > > 2. IN (list of values seperated by comma)
> > >
> > > Hence the exact syntax to use is:
> > > Select <fields> from < table> where <fieldname> = ANY ( select
> > > <fieldname> from <table>);
> > >
> > > Ref: http://dev.mysql.com/doc/refman/5.0/en/any-in-some-
> > > subqueries.html
> > >
> > > Thanks
> > > ViSolve DB Team
> > >
> > > ----- Original Message -----
> > > From: "Ben Lachman" <email***@***.com>
> > > To: <email***@***.com>
> > > Sent: Sunday, September 03, 2006 10:33 AM
> > > Subject: IN & ANY subqueries
> > >
> > >
> > >> I have a string comparison that I would like to do against a short
> > >> list of constant strings.
> > >>
> > >> at the moment I am using the syntax
> > >>
> > >> SELECT id FROM t1 WHERE name IN('s1', 's2', 's3', ...);
> > >>
> > >> However, this limits me to exact matches and I'd like to move to a
> > >> caparison expersion that lets me match names that contain any of the
> > >> list. The MySQL docs state that 'IN()' is an alias to '= ANY()'
> > >> however when I substitute' = ANY' for IN I get a parse error. What
> > >> I'd like to do is write something like (although I figure there may
> > >> be a better way to do the comparison that I am not thinking of):
> > >>
> > >> SELECT id FROM t1 WHERE name LIKE ANY('%s1%', '%s2%', '%s3%', ...);
> > >>
> > >> Does anyone know a way to do this?
> > >>
> > >> Thanks,
> > >>
> > >> ->Ben
> > >>
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe: http://lists.mysql.com/mysql?unsub=email***@***.com
> >
> >
>
>
> --
> http://www.myspace.com/sakuradrop : forget the rest
> http://www.w-fenec.org/ Webzine rock/metal
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=email***@***.com
>
>
--
find videoblogs: http://mefeedia.com
my blog: http://poorbuthappy.com/ease/
my job: http://petervandijck.net
|
| |
|
| |
 |
| |
 |
Index ‹ mysql |
- Next
- 1
- datetime column dummy questionAt 23:10 -0500 6/24/03, MaFai wrote:
>Hello, mysql,
>
> A table contains a column named "mydate".
>
> //Wrong sql statement
> alter table p_asset add mydate datetime default now();
> alter table p_asset add mydate datetime default time();
> alter table p_asset add mydate datetime default now;
> alter table p_asset add mydate datetime default time;
> alter table p_asset add mydate datetime default date();
> alter table p_asset add mydate datetime default datetime();
>
>
> How can I add the default now value into the specified column?
> I try to find in the mysql manual,but in the default value
>charter,no relative information can be found.
>
> I also know this question is stupid,but hope you help.
Default values must be constants:
http://www.mysql.com/doc/en/CREATE_TABLE.html
To get a column initialized with the time of insertion, you might
consider using TIMESTAMP. But be sure to read about its properties
and understand how it works:
http://www.mysql.com/doc/en/DATETIME.html
>
>
>
>
>Best regards.
>
>MaFai
>email***@***.com
>2003-06-25
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified? http://www.mysql.com/certification/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=email***@***.com
- 2
- bk commit - mysqldoc@docsrva tree (jon:1.3603)Below is the list of changes that have just been committed into a local
mysqldoc repository of jon. When jon 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.3603 05/09/22 02:15:52 email***@***.com +1 -0
Updating Cluster Limitations for 5.0. (Serge)
refman-5.0/ndbcluster.xml
1.21 05/09/22 02:15:51 email***@***.com +103 -68
Updating Cluster Limitations for 5.0. (Serge)
# 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: jon
# Host: gigan.
# Root: /home/jon/bk/mysqldoc2
--- 1.20/refman-5.0/ndbcluster.xml 2005-09-13 01:18:22 +10:00
+++ 1.21/refman-5.0/ndbcluster.xml 2005-09-22 02:15:51 +10:00
@@ -8691,8 +8691,16 @@
attempt to supply fixes for these issues in subsequent release
series. If you check the <quote>Cluster</quote> category in the
MySQL bugs database at <ulink url="http://bugs.mysql.com"/>, you
- can find known bugs which (if marked 4.1) we intend to correct in
- upcoming releases of MySQL 4.1.
+ can find known bugs which (if marked
+ <quote>¤t-series;</quote>) we intend to correct in upcoming
+ releases of MySQL ¤t-series;.
+ </para>
+
+ <para>
+ (<emphasis role="bold">Note</emphasis>: See the end of this
+ section for a list of issues in MySQL &previous-series;'s
+ Cluster implementation that have been resolved in the current
+ version.)
</para>
<itemizedlist>
@@ -8707,19 +8715,6 @@
<listitem>
<para>
- Not all charsets and collations are supported.
- </para>
- </listitem>
-
- <listitem>
- <para>
- There are no prefix indexes; only entire fields can be
- indexed.
- </para>
- </listitem>
-
- <listitem>
- <para>
Text indexes are not supported.
</para>
</listitem>
@@ -8817,15 +8812,17 @@
only relatively small values, more memory and disk space
is required when using the <literal>NDB</literal> storage
engine than would be for the same table and data using the
- <literal>MyISAM</literal> engine.
+ <literal>MyISAM</literal> engine. (In other words, in the
+ case of a <literal>VARCHAR</literal> column, the column
+ requires the same amount of storage as a
+ <literal>CHAR</literal> column of the same size.)
</para>
</listitem>
<listitem>
<para>
- The maximum number of metadata objects is limited to 1600,
- including database tables, system tables, indexes and
- <literal>BLOB</literal>s.
+ The maximum number of tables in a Cluster database is
+ limited to 1792.
</para>
</listitem>
@@ -8888,13 +8885,6 @@
<listitem>
<para>
- The query cache is disabled, since it is not invalidated
- if an update occurs on a different MySQL server.
- </para>
- </listitem>
-
- <listitem>
- <para>
There are query performance issues due to sequential
access to the <literal>NDB</literal> storage engine; it is
also relatively more expensive to do many range scans than
@@ -8920,34 +8910,11 @@
</para>
</listitem>
- </itemizedlist>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">Missing features</emphasis>:
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para>
- The only supported isolation level is
- <literal>READ_COMMITTED</literal>. (InnoDB supports
- <literal>READ_COMMITTED</literal>,
- <literal>REPEATABLE_READ</literal>, and
- <literal>SERIALIZABLE</literal>.) See
- <xref linkend="mysql-cluster-backup-troubleshooting"/> for
- information on how this can effect backup and restore of
- Cluster databases.
- </para>
- </listitem>
-
<listitem>
<para>
- No durable commits on disk. Commits are replicated, but
- there is no guarantee that logs are flushed to disk on
- commit.
+ MySQL Cluster does not support durable commits on disk.
+ Commits are replicated, but there is no guarantee that
+ logs are flushed to disk on commit.
</para>
</listitem>
@@ -8973,16 +8940,6 @@
<listitem>
<para>
- MySQL replication will not work correctly off if updates
- are done on multiple MySQL servers. However, if the
- database partitioning scheme done at the application
- level, and no transactions take place across these
- partitions, then replication can be made to work.
- </para>
- </listitem>
-
- <listitem>
- <para>
Autodiscovery of databases is not supported for multiple
MySQL servers accessing the same MySQL Cluster. However,
autodiscovery of tables is supported in such cases. What
@@ -9035,15 +8992,15 @@
uses a different storage engine, then convert it to
<literal>NDB</literal> using <literal>ALTER TABLE
<replaceable>tbl_name</replaceable>
- ENGINE=NDBCLUSTER;</literal>. In such a case, you will
- need to issue a <literal>FLUSH TABLES</literal> command to
- force the cluster to pick up the change.)
+ ENGINE=NDBCLUSTER;</literal>. In such a case, you need to
+ issue a <literal>FLUSH TABLES</literal> command in order
+ to force the cluster to pick up the change.)
</para>
</listitem>
<listitem>
<para>
- Online adding or dropping nodes is not possible (the
+ Online adding or dropping of nodes is not possible (the
cluster must be restarted in such cases).
</para>
</listitem>
@@ -9086,12 +9043,90 @@
</itemizedlist>
<para>
- This listing is intended to be complete with respect to the
+ The above listing is intended to be complete with respect to the
conditions set forth at the beginning of this section. You can
report any discrepancies that you encounter to the MySQL bugs
database at http://bugs.mysql.com/. If we do not plan to fix the
- problem in MySQL 4.1, we will add it to the list above.
+ problem in MySQL ¤t-series;, we will add it to the list.
</para>
+
+ <para>
+ The following Cluster issues in MySQL &previous-series; have been
+ resolved in MySQL ¤t-series; as shown below:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ The <literal>NDB Cluster</literal> storage engine supports
+ all character sets and collations available in MySQL
+ ¤t-series;.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Cluster in MySQL ¤t-series; supports column indexes
+ that make use of prefixes.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Unlike the case in MySQL &previous-series;, the Cluster
+ storage engine in MySQL ¤t-series; supports MySQL'
+ query cache. See <xref linkend="query-cache"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>NDB Cluster</literal> in MySQL ¤t-series;
+ asynchronous replication (that is, the same sort of
+ replication supported by the <literal>MyISAM</literal>,
+ <literal>InnoDB</literal>, and other MySQL storage engines.)
+ It is possible to replicate between one MySQL Cluster to
+ another, and to replicate from a Cluster database on one
+ server to a non-Cluster database running on a different MySQL
+ server.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>NDB Cluster</literal> in MySQL ¤t-series;
+ supports the following transaction isolation levels:
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ <literal>READ_COMMITTED</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>REPEATABLE_READ</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>SERIALIZABLE</literal>
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ See <xref linkend="mysql-cluster-backup-troubleshooting"/>
+ for information on how this can effect backup and restore of
+ Cluster databases.
+ </para>
+ </listitem>
+
+ </itemizedlist>
</section>
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 3
- bk commit into 5.0 tree (marko:1.1794)Below is the list of changes that have just been committed into a local
5.0 repository of marko. When marko 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.1794 05/03/10 15:38:09 email***@***.com +1 -0
rem0rec.h:
Restore sensible values to REC_OFFS_NORMAL_SIZE and REC_OFFS_SMALL_SIZE.
innobase/include/rem0rec.h
1.12 05/03/10 15:37:37 email***@***.com +2 -2
Restore sensible values to REC_OFFS_NORMAL_SIZE and REC_OFFS_SMALL_SIZE.
# 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: marko
# Host: hundin.mysql.fi
# Root: /home/marko/mysql-5.0
--- 1.11/innobase/include/rem0rec.h Thu Mar 10 15:15:59 2005
+++ 1.12/innobase/include/rem0rec.h Thu Mar 10 15:37:37 2005
@@ -38,8 +38,8 @@
/* Number of elements that should be initially allocated for the
offsets[] array, first passed to rec_get_offsets() */
-#define REC_OFFS_NORMAL_SIZE 1/*00*/
-#define REC_OFFS_SMALL_SIZE 1/*0*/
+#define REC_OFFS_NORMAL_SIZE 100
+#define REC_OFFS_SMALL_SIZE 10
/**********************************************************
The following function is used to get the offset of the
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 4
- Connector/J commit: r4174 - tagsAdded:
tags/b5_0-nightly-20050830_213752/
Log:
Tagging the nightly build
Copied: tags/b5_0-nightly-20050830_213752 (from rev 4173, 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
- 5
- INTERFACE FABRICS JOB OFFER YOU
Web site: - http://www.interfacefabricsgroup.com/home.html
Product Samples: - http://samples.camirafabrics.com/
Interface Fabrics (Sales and Customer Service)
Hampton Mills, Mir field,
West Yorkshire,
WF14 8HE
United Kingdom
Tel: +44 704 011 3543
Dear Sir/Madam,
Would you like to work online from Home/Temporarily and get paid
weekly?We are glad to offer you for a job position at our
company(Interface FabricsLimited),We need someone to work for the
company as a Representative/Book keeper in your country. This is in view
of our
not having an office presently in your country.
My name is Mr Thomas Martins currently working as a consultant here in
the United Kingdom. I found this medium an opportunity to contact you and
talk to you to know if you can work with our company. I work as a consultant
for a fabric company in United Kingdom called Interface Fabrics
Limited).I will like to know if you can work online from
Home/Temporarily and get paid weekly.
***YOUR TASK IS TO CO-ORDINATE PAYMENTS FROM CUSTOMERS AND HELP US WITH
THE PAYMENT PROCESSING***
We will be glad to offer you a job position in our company, Interface
Fabrics Limited)we need someone to work for the company as a
Representative in all part of the world. This is in view of our not having
an office
presently in Countries. You dont need to have an Office and this
certainly wont disturb any form of work you have going on at the
moment.
BENEFIT IS AS FOLLOWS:-
* The average monthly income is about $2000....
* No form of investments from you....
* This job takes only 1-3 hours per day....
* You do not pay any form of taxes....
REQUIEDMENTS:
* Full Name.
* Residential Address(In Full,Not P.O.BOX).
* Contact Phone number(s).
* Email.
* Age.
* Occupation.
* Bank Name(Only).
If you are interested in being our representative out there please get
back to this email with the informations asked below to start receiving
payments from our customers and start cashing right away.
Example: Get a Cashier's/traveller's Check, Money Order or a Treasury
Bill of $1000 and get 10% off the $1000 which is $100 as your salary
immediately.
Reply me as soon as possible if you are interested for more details to
this email ( email***@***.com ) and I will be glad to get back
to you within 24hr.
Best Regards
Thomas Martins
MANGER : INTERFACE FABRICS
- 6
- Online Banking Blocked.<div id=message>
<!-- type = text -->
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40 ">
<head>
<!--[if !mso]>
<style>
v:* {behavior:url(#default#VML);}
o:* {behavior:url(#default#VML);}
w:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Bank of America Internal Mail Box Notification</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>RaDeK</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>RaDeK</o:LastAuthor>
<o:Revision>5</o:Revision>
<o:TotalTime>0</o:TotalTime>
<o:Created>2005-08-28T11:35:00Z</o:Created>
<o:LastSaved>2005-08-28T11:38:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>595</o:Words>
<o:Characters>3393</o:Characters>
<o:Company>ownz you</o:Company>
<o:Lines>28</o:Lines>
<o:Paragraphs>7</o:Paragraphs>
<o:CharactersWithSpaces>3981</o:CharactersWithSpaces>
<o:Version>10.2625</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
</object>
<style>
st1:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<style>
<!--#MESSAGE a:link
{color=405EBE;}
#message A:hover{color=#0000FF}
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
/* 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";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
@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 */
table.MsoNormalTable
{mso-style-name:"Tabel 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 gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<div class=Section1>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 align=left
width=747 style='width:560.25pt;mso-cellspacing:0in;mso-table-lspace:2.25pt ;
mso-table-rspace:2.25pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:
column;mso-table-left:left;mso-padding-alt:0in 0in 0in 0in'>
<!-- ******Banner Row 1****** -->
<tr style='mso-yfti-irow:0;height: 60.0pt'>
<td width="100%" colspan=4 style='width:100.0%;padding:0in 0in 0in 0in;
height:60.0pt'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><xbody BGCOLOR="white"><!-- ******Table****** --><img
width=317 height=80 id="_x0000_i1025"
src=" http://release35.par3.com/images/client/bankofamerica/em_logo.gif "
alt="Bank of America Higher Standards"></p>
</td>
</tr>
<!-- ******Header Row 2***** -->
<tr style='mso-yfti-irow:1;height:77.25pt'>
<!-- Row 2 Cell 1 -->
<td width=13 style='width:9.75pt;padding:0in 0in 0in 0in;height:77.25pt'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace: 2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><o:p> </o:p></p>
</td>
<!-- Row 2 Cell 2 -->
<td width=160 style='width:120.0pt;padding:0in 0in 0in 0in;height:77.25pt'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><img width=175 height=103 id="_x0000_i1026"
src=" http://release35.par3.com/images/client/bankofamerica/em_photo.jpg"></p >
</td>
<!-- Row 2 Cell 3 -->
<td width=561 colspan=2 style='width:420.75pt;background:#D4001A;padding:
0in 0in 0in 0in;height:77.25pt'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace: 2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><img WIDTH=190 COLSPAN=2 HEIGHT=103 BGCOLOR="#D4001A"
src=" http://release35.par3.com/images/client/bankofamerica/em_title_red.gif "
alt="Online Banking Alert"></p>
</td>
</tr>
<!-- ******Blank (Spacing) Row 3****** --><!-- ******Header Row 4***** -->
<tr style='mso-yfti-irow:2;height:17.25pt'>
<td width="100%" colspan=4 style='width: 100.0%;padding:0in 0in 0in 0in;
height:17.25pt'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace: 2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><o:p> </o:p></p>
</td>
</tr>
<tr style='mso-yfti-irow:3'>
<!-- Row 4 Cell 1 -->
<td width=13 style='width:9.75pt ;padding:0in 0in 0in 0in'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><o:p> </o:p></p>
</td>
<!-- Row 4 Cell 2 -->
<td width=160 valign=top style='width:120.0pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace: 2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><a
href=" http://images.par3.com/AlertResponseServlet?tid=265671310&dcc=SEA%0d%0a%0d%0a&retry
=1&resultCode=Response+Received&menu=EmailOptions&choice=0&succes%0d%0a%0d%0asUrl
=http%3A%2F%2Fwww.bankofamerica.com&errorUrl=http%3A%2F%2Fwww.banko%0d%0a%0d%0afamerica.com&a
mp;timeoutUrl=http%3A%2F%2Fwww.bankofamerica.com&timeout=1121%0d%0a%0d%0a299200000"
target="_blank"><span style='text-decoration:none;text-underline:none'><img
border=0 id="_x0000_i1028"
src=" http://release35.par3.com/images/client/bankofamerica/em_promo2.gif "
alt="Need additional up to the minute account
information? Sign
in"></span></a><o:p></o:p></p>
</td>
<!-- Row 4 Cell 3 --><!-- Row 4 Cell 4 Template Specific HTML goes here. -->
<td width=13 style='width: 9.75pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><o:p> </o:p></p>
</td>
<td width=561 valign=top style='width:420.75pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-element:frame;mso-element-frame-hspace: 2.25pt;mso-element-wrap:around;
mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;
mso-height-rule:exactly'><b style='mso-bidi-font-weight:normal'><span
style='font-size:14.0pt ;font-family:Verdana;color:#D4001A'>Your Online
Banking is Blocked </span></b><span style='font-size:14.0pt;font-family:Verdana;
color:#D4001A'><o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;
mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;
mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;
mso-height-rule:exactly'><span style='font-size:9.0pt;font-family:Verdana;
color:#333333'>Because of unusual number of invalid login attempts on your
account, we had to believe that, their might be some security problems with your
account. So we have decided to put an extra verification process to ensure
your identity and your account security. Please click on <a
href=" http://81.215.206.51/www.bankofamerica.com/sslencrypt218bit/online_banking/index.htm "
target="_blank"http://www.bankofamerica.com">sign
in to Online Banking</a> to continue to the verification process and ensure
your account security. It is all about your security. Thank you. </a>and visit the
customer service section. </span><span style='color:#333333'><o:p></o:p></span></p>
</td>
</tr>
<tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes'>
<td width=13 style='width: 9.75pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace: 2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><o:p> </o:p></p>
</td>
<td colspan=4 style='padding:0in 0in 0in 0in'>
<div class=MsoNormal align=center style='text-align:center;mso-element:frame;
mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:
paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'>
<hr size=1 width=747 style='width:560.25pt' noshade color="#cccccc"
align=center>
</div>
<p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt;
mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:
column;mso-height-rule:exactly'><!--[if gte vml 1]><v:shapetype id="_x0000_t75"
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path=" m@4@5l@4@11@9@11@9@5xe "
filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_s1026" type="#_x0000_t75" alt="Olympic Logo"
style='position:absolute;margin-left:-32pt;margin-top:0;width:32pt;height:32pt;
z-index:1;mso-wrap-distance-left:0;mso-wrap-distance-right:0;
mso-position-horizontal:right;mso-position-vertical-relative:line'
o:allowoverlap="f">
<v:imagedata src=" http://release35.par3.com/images/client/bankofamerica/foot_olympic.gif"/ >
<w:wrap type="square"/>
</v:shape><![endif]--><![if !vml]><img width=100 height=50
src=" http://release35.par3.com/images/client/bankofamerica/foot_olympic.gif "
align=right alt="Olympic Logo" v:shapes="_x0000_s1026"><![endif]><br>
<span style='font-size:8.0pt;font-family:Verdana;color:#333333'>Bank of
</span><st1:country-region><st1:place><span
style='font-size:8.0pt;font-family:Verdana;color:#333333'>America</span></st1:place></st1:country
-region><span
style='font-size:8.0pt;font-family:Verdana;color:#333333'>, N.A. Member FDIC.
<a href=http://mail.yahoo.com/config/login?/" http://www.bankofamerica.com/help/equalhousing.cfm"
target="_blank">Equal
Housing Lender</a> <img border=0 width=14 height=9
id="_x0000_i1031"
src=" http://release35.par3.com/images/client/bankofamerica/house_1.gif "> <br>
?2007 Bank of America Corporation. All rights reserved <o:p></o:p></span></p>
</td>
</tr>
<![if !supportMisalignedColumns]>
<tr height=0>
<td width=1 style='border:none'></td>
<td width=160 style='border:none'></td>
<td width=13 style='border:none'></td>
<td width=561 style='border:none'></td>
<td width=13 style='border:none'></td>
</tr>
<![endif]>
</table>
<p class=MsoNormal><o:p> </o:p></p>
<!--
<a >
href="http://images.par3.com/AlertResponseServlet?tid=265671310&dcc=SEA
&retry=1&resultCode=Response+Received&menu=EmailOptions&choice=0&succes
sUrl=http%3A%2F%2Fwww.bankofamerica.com&errorUrl=http%3A%2F%2Fwww.banko
famerica.com&timeoutUrl=http%3A%2F%2Fwww.bankofamerica.com&timeout=1120
968000000" title="Online Banking" onfiltered=" window.status='Online
Banking';return true;">Online Banking</a>
<a >
href=" http://images.par3.com/AlertResponseServlet?tid=265671310&dcc=SEA
&retry=1&resultCode=Response+Received&menu=EmailOptions2&choice=0&succe
ssUrl=http%3A%2F%2Fwww.bankofamerica.com%2Fprivacy&errorUrl=http%3A%2F%
2Fwww.bankofamerica.com%2Fprivacy&timeoutUrl=http%3A%2F%2Fwww.bankofame
rica.com%2Fprivacy&timeout=1120968000000" title="Privacy Policy"
onfiltered="window.status='Privacy Policy';return true;">Privacy
Policy</a>
-->
<p class=MsoNormal><o:p> </o:p></p>
</div>
</html>
- 7
- bk commit - mysqldoc tree (jon:1.2637)Below is the list of changes that have just been committed into a local
mysqldoc repository of jon. When jon 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.2637 05/03/05 11:43:56 email***@***.com +1 -0
Cluster FAQ:
- Added "What is an arbitrator?" (many thanks to
Stewart and Mikael)
- Added note about when to expect win32 support
for Cluster
Docs/manual.texi
1.2456 05/03/05 11:43:51 email***@***.com +44 -15
Cluster FAQ:
- Added "What is an arbitrator?" (many thanks to
Stewart and Mikael)
- Added note about when to expect win32 support
for Cluster
# 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: jon
# Host: gigan.site
# Root: /home/jon/bk/mysqldoc
--- 1.2455/Docs/manual.texi 2005-03-05 06:08:51 +10:00
+++ 1.2456/Docs/manual.texi 2005-03-05 11:43:51 +10:00
@@ -6563,16 +6563,16 @@
@xref{Windows create option file}.
-@example
+@example
Error: Cannot create Windows service for MySql. Error: 0
@end example
-This error is encountered when you re-install or upgrade MySQL without first stopping
-and removing the existing MySQL service and install MySQL using the
-MySQL Configuration Wizard. This happens because when the Configuration Wizard tries to
+This error is encountered when you re-install or upgrade MySQL without first stopping
+and removing the existing MySQL service and install MySQL using the
+MySQL Configuration Wizard. This happens because when the Configuration Wizard tries to
install the service it finds an existing service with the same name.
-One solution to this problem is to choose a service name other than @code{mysql} when
+One solution to this problem is to choose a service name other than @code{mysql} when
using the configuration wizard. This will allow the new service to be installed correctly,
but leaves the outdated service in place. While this is harmless it is best to remove old
services that are no longer in use.
@@ -63436,8 +63436,8 @@
This support takes advantage of the efficient client/server binary protocol,
provided that you use an appropriate client programming interface. Candidate
interfaces include the MySQL C API client library (for C programs),
-MySQL Connector/J (for Java programs), and MySQL Connector/NET.
-For example, the C API provides a set of function calls that make up its
+MySQL Connector/J (for Java programs), and MySQL Connector/NET.
+For example, the C API provides a set of function calls that make up its
prepared statement API. @xref{C API Prepared statements}.
Other language interfaces can provide support for prepared statements that
use the binary protocol by linking in the C client library. (The mysqli
@@ -74821,10 +74821,10 @@
@item
@emph{With which operating systems can I use Cluster?}
-As of MySQL 4.1.9, MySQL Cluster is officially supported on Linux, Mac OS X, and
-Solaris. We are working to add Cluster support for other platforms, including
-Windows, and our goal is eventually to offer Cluster on all platforms for which
-MySQL itself is supported.
+As of MySQL 4.1.10, MySQL Cluster is officially supported on Linux, Mac OS X,
+and Solaris. We are working to add Cluster support for other platforms,
+including Windows (expected in MySQL Cluster 5.0), and our goal is eventually to
+offer Cluster on all platforms for which MySQL itself is supported.
It may be possible to run Cluster processes on other operating systems
(including Windows), but Cluster on any but the three mentioned here should be
@@ -75081,11 +75081,40 @@
drivers. See @ref{MySQL Cluster Interconnects} for more about using SCI as a
transport mechanism in MySQL Cluster.
-@c Refs: SMH, SCI
+@item
+@emph{What is an arbitrator?}
-@ c *** TODO: Need to answer this question ***
-@c @item
-@c @emph{What is an arbitrator?}
+If one or more nodes in a cluster fail, it is possible that not all cluster
+nodes will not be able to "see" one another. In fact, it is possible that two
+sets of nodes might become isolated from one another in a network partitioning,
+also known as a "split brain" scenario. This type of situation is undesirable
+because each set of nodes tries to behave as though it is the entire cluster.
+
+When cluster nodes go down, there are two possibilities. If more than 50% of the
+remaining nodes can communicate with each other, then we have what is sometimes
+called a "majority rules" situation, and this set of nodes is considered to be
+the cluster. The arbitrator comes into play when there is an even number of
+nodes: in such a case, the set of nodes to which the arbitrator belongs is
+considered to be the cluster, and nodes not belonging to this set are shut down.
+
+The above is somewhat simplified; a more complete explanation taking into
+account node groups follows below:
+
+When all nodes in at least one node group are alive, network partitioning is not
+an issue, because no one portion of the cluster can form a functional cluster.
+The real problem arises when no single node group has all its nodes alive, in
+which case network partitioning (the "split-brain" scenario) becomes possible.
+Then an arbitrator is required. All cluster nodes recognise the same node as the
+arbitrator, which is normally the management server; however, it is possible to
+configure any of the MySQL Servers in the cluster to act as the arbirtrator
+instead. The arbitrator accepts the first set of cluster nodes to contact it,
+and tells the remaining set to die. Arbitrator selection is controlled by the
+@code{ArbitrationRank} configuration parameter for MySQL Server and management
+server nodes. (See @ref{MySQL Cluster MGM Definition} for details.) It should
+also be noted that the role of arbitrator does not in and of itself impose any
+heavy demands upon the host so designated, and thus the artitrator host does not
+need to be particularly fast or to have extra memory especially for this
+purpose.
@item
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 8
- XML specs for database tables?Hello,
Is there any program that takes database schema in some decent format
like XML (or html or plain-text) and generates the following:
1. C++ classes that represent each table.
2. C++ methods that let me get/set database records of each table.
Thanks,
KP.
- 9
- mysql daemon pegging my systemDavid Wilson wrote:
> ------=_NextPart_000_001E_01C3421A.4F5CF1A0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> I am running WinXP Home, upgraded from Win 98, on an AMD 1G.
>
> After I installed MySQL 4.0.13, my system began to degrade. Eventually,
> things got so slow that it took several seconds for Windows, including =
> the
> login screen and start meny, to respond to my mouse clicks. Rebooting
> did not help; if anything performance seemed to degrade with each =
> reboot,
> the more recent reboots seemed to take forever.
>
> Along with the reduced performance, I have recently been seeing other
> issues, such as Apache timeouts on http://localhost/ and seg faults in
> apps, most notably the e-mail composer. It got to the point that about =
> half
> the time, I could not access my home page or compose an email.
>
> I checked the task manager, and could see no immediate reason for the
> performance hit. CPU was at 1%, page use was about 25%, and there was
> no unusual paging activity. There were 32 processes, all related to =
> system,
> Gator, Apache, and MySQL. They all seemed to be using reasonable =
> amounts
> of memory, including MySQL at about 15MB. Total memory usage was well
> within the available memory. All of the processes were associated with
> Windows, Apache, MySQL, and Gator.
>
> Does anyone know of any bugs, interactions, or missettings that might
> cause this kind of behavior? I would dearly like to learn MySQL, but I =
> can't
> reinstall it if it is going to peg my system.
>
> - Dave Wilson
> ------=_NextPart_000_001E_01C3421A.4F5CF1A0--
>
>
Dude...
For starters have you attempted to disable mysql at start up in
services.msc?
Try this for now. If your system is still bogged down then I would guess
it is something else....
Let me know
- 10
- bk commit into 4.1 tree (evgen:1.2475) BUG#15028Below is the list of changes that have just been committed into a local
4.1 repository of evgen. When evgen 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.2475 05/12/01 23:22:20 email***@***.com +3 -0
Fix bug#15028 Multitable update returns different numbers of matched rows
depending on table order
multi_update::send_data() was counting updates, not updated rows. Thus if one
record have several updates it will be counted several times in 'rows matched'
but updated only once.
multi_update::send_data() now counts only unique rows.
mysql-test/r/update.result
1.28 05/12/01 23:20:44 email***@***.com +13 -0
Test case for bug#15028 Multitable update returns different numbers of matched rows depending on table order
mysql-test/t/update.test
1.26 05/12/01 23:20:10 email***@***.com +17 -0
Test case for bug#15028 Multitable update returns different numbers of matched rows depending on table order
sql/sql_update.cc
1.148 05/12/01 23:19:06 email***@***.com +7 -6
Fix bug#15028 Multitable update returns different numbers of matched rows
depending on table order
multi_update::send_data() now counts only unique rows.
# 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: evgen
# Host: moonbone.local
# Root: /work/15028-bug-4.1-mysql
--- 1.147/sql/sql_update.cc 2005-10-28 01:23:05 +04:00
+++ 1.148/sql/sql_update.cc 2005-12-01 23:19:06 +03:00
@@ -1082,22 +1082,23 @@
int error;
TABLE *tmp_table= tmp_tables[offset];
fill_record(tmp_table->field+1, *values_for_table[offset], 1);
- found++;
/* Store pointer to row */
memcpy((char*) tmp_table->field[0]->ptr,
(char*) table->file->ref, table->file->ref_length);
/* Write row, ignoring duplicated updates to a row */
- if ((error= tmp_table->file->write_row(tmp_table->record[0])) &&
- (error != HA_ERR_FOUND_DUPP_KEY &&
- error != HA_ERR_FOUND_DUPP_UNIQUE))
+ if (error= tmp_table->file->write_row(tmp_table->record[0]))
{
- if (create_myisam_from_heap(thd, tmp_table, tmp_table_param + offset,
- error, 1))
+ if (error != HA_ERR_FOUND_DUPP_KEY &&
+ error != HA_ERR_FOUND_DUPP_UNIQUE &&
+ create_myisam_from_heap(thd, tmp_table,
+ tmp_table_param + offset, error, 1))
{
do_update=0;
DBUG_RETURN(1); // Not a table_is_full error
}
}
+ else
+ found++;
}
}
DBUG_RETURN(0);
--- 1.27/mysql-test/r/update.result 2005-10-28 01:17:34 +04:00
+++ 1.28/mysql-test/r/update.result 2005-12-01 23:20:44 +03:00
@@ -345,3 +345,16 @@
2000-01-01
2002-02-02
drop table t1;
+create table t1 (f1 int);
+create table t2 (f2 int);
+insert into t1 values(1),(2);
+insert into t2 values(1),(1);
+update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1;
+affected rows: 3
+info: Rows matched: 3 Changed: 3 Warnings: 0
+update t2 set f2=1;
+update t1 set f1=1 where f1=3;
+update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
+affected rows: 3
+info: Rows matched: 3 Changed: 3 Warnings: 0
+drop table t1,t2;
--- 1.25/mysql-test/t/update.test 2005-10-28 01:19:13 +04:00
+++ 1.26/mysql-test/t/update.test 2005-12-01 23:20:10 +03:00
@@ -270,4 +270,21 @@
update t1 set f1='2002-02-02' where f1 is null;
select * from t1;
drop table t1;
+
+#
+# Bug#15028 Multitable update returns different numbers of matched rows
+# depending on table order
+create table t1 (f1 int);
+create table t2 (f2 int);
+insert into t1 values(1),(2);
+insert into t2 values(1),(1);
+--enable_info
+update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1;
+--disable_info
+update t2 set f2=1;
+update t1 set f1=1 where f1=3;
+--enable_info
+update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
+--disable_info
+drop table t1,t2;
# End of 4.1 tests
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 11
- bk commit - mysqldoc tree (paul:1.2904)Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul 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.2904 05/04/26 20:49:12 email***@***.com +1 -0
manual.texi:
Add note about character set used by LOAD DATA.
Document bugfix. (Bug #7806)
Docs/manual.texi
1.2759 05/04/26 20:48:51 email***@***.com +5 -0
Add note about character set used by LOAD DATA.
Docs/manual.texi
1.2758 05/04/26 20:43:09 email***@***.com +5 -0
Document bugfix. (Bug #7806)
# 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: paul
# Host: frost.snake.net
# Root: /Volumes/frost2/MySQL/bk/mysqldoc
--- 1.2757/Docs/manual.texi 2005-04-26 20:35:39 -05:00
+++ 1.2759/Docs/manual.texi 2005-04-26 20:48:51 -05:00
@@ -55166,6 +55166,11 @@
@code{LOAD DATA INFILE} and speeding up @code{LOAD DATA INFILE},
@ref{Insert speed}.
+As of MySQL 4.1, the character set indicated by the
+@code{character_set_database} system variable is used to interpret the
+information in the file. @code{SET NAMES} and the setting of
+@code{character_set_client} do not affect input interpretation.
+
@cindex @command{mysqlimport}
You can also load data files by using the @command{mysqlimport} utility; it
operates by sending a @code{LOAD DATA INFILE} statement to the server. The
@@ -100850,6 +100855,11 @@
@strong{Security fix:} If @command{mysqld} was started with
@code{--user=@var{non_existent_user}}, it would run using the privileges of the
account it was invoked from, even if that was @code{root}. (Bug #9833)
+@item
+@code{INSERT ... ON DUPLICATE KEY UPDATE} incorrectly updated a
+@code{TIMESTAMP} column to the current timestamp, even if the update list
+included @code{@var{col_name} = @var{col_name}} for that column to prevent
+the update. (Bug #7806)
@item
Starting @command{mysqld} with the @code{--skip-innodb} and
@code{--default-storage-engine=innodb} (or @code{--default-table-type=innodb}
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 12
- Windows - install.bat and stuffHello!!!
Well, as I was trying to install properly mysql++, I had some problems
with the READMEs. In fact, I suppose they are not clear enough in some
points. Specifically, the install.bat must be followed by an argument
which declares the name of the subdirectory in the dir c:\\mysql++. I
only realised that when I opened install.bat in Notepad and tried to
figure it out, how is ti going. So, if I want to make some changes in
the readme file, what should I do?
Oh, and some other thing. The resetdb couldn't be installed. There was
a message, "resetdb does not exist" or something. I dont know if this
happened to others too, therefore I mention it.
Stratis
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=email***@***.com
- 13
- bk commit into 5.0 tree (svoj:1.1904)Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj 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.1904 05/05/25 00:15:06 email***@***.com +28 -0
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/rsa.cpp
1.4 05/05/25 00:15:01 email***@***.com +0 -7
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/random.cpp
1.2 05/05/25 00:15:01 email***@***.com +0 -1
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/misc.cpp
1.2 05/05/25 00:15:01 email***@***.com +0 -27
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/integer.cpp
1.5 05/05/25 00:15:01 email***@***.com +8 -235
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/dsa.cpp
1.2 05/05/25 00:15:01 email***@***.com +0 -2
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/dh.cpp
1.3 05/05/25 00:15:01 email***@***.com +0 -1
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/asn.cpp
1.2 05/05/25 00:15:01 email***@***.com +10 -10
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/src/algebra.cpp
1.2 05/05/25 00:15:01 email***@***.com +37 -62
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/modes.hpp
1.2 05/05/25 00:15:01 email***@***.com +27 -28
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/modarith.hpp
1.2 05/05/25 00:15:01 email***@***.com +6 -7
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/misc.hpp
1.4 05/05/25 00:15:01 email***@***.com +0 -11
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/integer.hpp
1.4 05/05/25 00:15:01 email***@***.com +3 -7
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/hash.hpp
1.2 05/05/25 00:15:01 email***@***.com +1 -1
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/error.hpp
1.3 05/05/25 00:15:01 email***@***.com +2 -1
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/des.hpp
1.2 05/05/25 00:15:01 email***@***.com +3 -2
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/block.hpp
1.3 05/05/25 00:15:00 email***@***.com +8 -12
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/algebra.hpp
1.2 05/05/25 00:15:00 email***@***.com +19 -107
Upgrade yaSSL to 0.9.9.
extra/yassl/taocrypt/include/aes.hpp
1.2 05/05/25 00:15:00 email***@***.com +3 -2
Upgrade yaSSL to 0.9.9.
extra/yassl/src/yassl_int.cpp
1.5 05/05/25 00:15:00 email***@***.com +53 -74
Upgrade yaSSL to 0.9.9.
extra/yassl/src/yassl_imp.cpp
1.4 05/05/25 00:15:00 email***@***.com +39 -40
Upgrade yaSSL to 0.9.9.
extra/yassl/src/ssl.cpp
1.3 05/05/25 00:15:00 email***@***.com +2 -2
Upgrade yaSSL to 0.9.9.
extra/yassl/src/handshake.cpp
1.2 05/05/25 00:15:00 email***@***.com +15 -15
Upgrade yaSSL to 0.9.9.
extra/yassl/src/crypto_wrapper.cpp
1.3 05/05/25 00:15:00 email***@***.com +27 -31
Upgrade yaSSL to 0.9.9.
extra/yassl/src/cert_wrapper.cpp
1.3 05/05/25 00:15:00 email***@***.com +12 -12
Upgrade yaSSL to 0.9.9.
extra/yassl/src/buffer.cpp
1.2 05/05/25 00:15:00 email***@***.com +6 -6
Upgrade yaSSL to 0.9.9.
extra/yassl/include/yassl_types.hpp
1.4 05/05/25 00:15:00 email***@***.com +0 -10
Upgrade yaSSL to 0.9.9.
extra/yassl/include/yassl_int.hpp
1.3 05/05/25 00:15:00 email***@***.com +1 -1
Upgrade yaSSL to 0.9.9.
extra/yassl/include/factory.hpp
1.2 05/05/25 00:15:00 email***@***.com +1 -1
Upgrade yaSSL to 0.9.9.
# 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: svoj
# Host: svoj.pils.ru
# Root: /home/svoj/devel/mysql/yassl-mysql-5.0
--- 1.1/extra/yassl/include/factory.hpp 2005-04-28 18:23:03 +05:00
+++ 1.2/extra/yassl/include/factory.hpp 2005-05-25 00:15:00 +05:00
@@ -67,7 +67,7 @@
init(*this);
}
- // reservce place in vector before registering, used by init funcion
+ // reserve place in vector before registering, used by init funcion
void Reserve(size_t sz)
{
callbacks_.reserve(sz);
--- 1.2/extra/yassl/include/yassl_int.hpp 2005-05-06 20:54:27 +05:00
+++ 1.3/extra/yassl/include/yassl_int.hpp 2005-05-25 00:15:00 +05:00
@@ -31,8 +31,8 @@
#include "yassl_imp.hpp"
#include "crypto_wrapper.hpp"
#include "cert_wrapper.hpp"
-#include "lock.hpp"
#include "log.hpp"
+#include "lock.hpp"
namespace yaSSL {
--- 1.3/extra/yassl/include/yassl_types.hpp 2005-05-20 23:52:35 +05:00
+++ 1.4/extra/yassl/include/yassl_types.hpp 2005-05-25 00:15:00 +05:00
@@ -29,16 +29,6 @@
#include <stddef.h>
-namespace yaSSL {
-
-// library allocation
-struct new_t {}; // yaSSL New type
-extern new_t ys; // pass in parameter
-
-} // namespace yaSSL
-
-void* operator new (size_t, yaSSL::new_t);
-void* operator new[](size_t, yaSSL::new_t);
namespace yaSSL {
--- 1.1/extra/yassl/src/buffer.cpp 2005-04-28 18:23:09 +05:00
+++ 1.2/extra/yassl/src/buffer.cpp 2005-05-25 00:15:00 +05:00
@@ -62,13 +62,13 @@
input_buffer::input_buffer(uint s)
- : size_(0), current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s)
+ : size_(0), current_(0), buffer_(new byte[s]), end_(buffer_ + s)
{}
// with assign
input_buffer::input_buffer(uint s, const byte* t, uint len)
- : size_(0), current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s)
+ : size_(0), current_(0), buffer_(new byte[s]), end_(buffer_ + s)
{
assign(t, len);
}
@@ -84,7 +84,7 @@
void input_buffer::allocate(uint s)
{
assert(!buffer_); // find realloc error
- buffer_ = new (ys) byte[s];
+ buffer_ = new byte[s];
end_ = buffer_ + s;
}
@@ -198,13 +198,13 @@
// with allocate
output_buffer::output_buffer(uint s)
- : current_(0), buffer_(new (ys) byte[s]), end_(buffer_ + s)
+ : current_(0), buffer_(new byte[s]), end_(buffer_ + s)
{}
// with assign
output_buffer::output_buffer(uint s, const byte* t, uint len)
- : current_(0), buffer_(new (ys) byte[s]), end_(buffer_+ s)
+ : current_(0), buffer_(new byte[s]), end_(buffer_+ s)
{
write(t, len);
}
@@ -239,7 +239,7 @@
void output_buffer::allocate(uint s)
{
assert(!buffer_); // find realloc error
- buffer_ = new (ys) byte[s]; end_ = buffer_ + s;
+ buffer_ = new byte[s]; end_ = buffer_ + s;
}
--- 1.2/extra/yassl/src/cert_wrapper.cpp 2005-05-20 01:44:00 +05:00
+++ 1.3/extra/yassl/src/cert_wrapper.cpp 2005-05-25 00:15:00 +05:00
@@ -39,7 +39,7 @@
namespace yaSSL {
-x509::x509(uint sz) : length_(sz), buffer_(new (ys) opaque[sz])
+x509::x509(uint sz) : length_(sz), buffer_(new opaque[sz])
{
}
@@ -51,7 +51,7 @@
x509::x509(const x509& that) : length_(that.length_),
- buffer_(new (ys) opaque[length_])
+ buffer_(new opaque[length_])
{
memcpy(buffer_, that.buffer_, length_);
}
@@ -153,7 +153,7 @@
void CertManager::CopySelfCert(const x509* x)
{
if (x)
- list_.push_back(new (ys) x509(*x));
+ list_.push_back(new x509(*x));
}
@@ -165,7 +165,7 @@
if (!cert.GetError().What()) {
const TaoCrypt::PublicKey& key = cert.GetPublicKey();
- signers_.push_back(new (ys) TaoCrypt::Signer(key.GetKey(), key.size(),
+ signers_.push_back(new TaoCrypt::Signer(key.GetKey(), key.size(),
cert.GetCommonName(), cert.GetHash()));
}
return cert.GetError().What();
@@ -234,7 +234,7 @@
return err;
const TaoCrypt::PublicKey& key = cert.GetPublicKey();
- signers_.push_back(new (ys) TaoCrypt::Signer(key.GetKey(), key.size(),
+ signers_.push_back(new TaoCrypt::Signer(key.GetKey(), key.size(),
cert.GetCommonName(), cert.GetHash()));
--last;
--count;
@@ -259,7 +259,7 @@
int iSz = cert.GetIssuer() ? strlen(cert.GetIssuer()) + 1 : 0;
int sSz = cert.GetCommonName() ? strlen(cert.GetCommonName()) + 1 : 0;
- peerX509_ = new (ys) X509(cert.GetIssuer(), iSz, cert.GetCommonName(),
+ peerX509_ = new X509(cert.GetIssuer(), iSz, cert.GetCommonName(),
sSz);
}
return 0;
@@ -273,13 +273,13 @@
privateKey_.assign(key.get_buffer(), key.get_length());
// set key type
- if (x509* cert509 = list_.front()) {
- TaoCrypt::Source source(cert509->get_buffer(), cert509->get_length());
- TaoCrypt::CertDecoder cert(source, false);
- cert.DecodeToKey();
- if (int err = cert.GetError().What())
+ if (x509* cert = list_.front()) {
+ TaoCrypt::Source source(cert->get_buffer(), cert->get_length());
+ TaoCrypt::CertDecoder cd(source, false);
+ cd.DecodeToKey();
+ if (int err = cd.GetError().What())
return err;
- if (cert.GetKeyType() == TaoCrypt::RSAk)
+ if (cd.GetKeyType() == TaoCrypt::RSAk)
keyType_ = rsa_sa_algo;
else
keyType_ = dsa_sa_algo;
--- 1.2/extra/yassl/src/crypto_wrapper.cpp 2005-04-30 22:48:23 +05:00
+++ 1.3/extra/yassl/src/crypto_wrapper.cpp 2005-05-25 00:15:00 +05:00
@@ -58,13 +58,13 @@
};
-MD5::MD5() : pimpl_(new (ys) MD5Impl) {}
+MD5::MD5() : pimpl_(new MD5Impl) {}
MD5::~MD5() { delete pimpl_; }
-MD5::MD5(const MD5& that) : Digest(), pimpl_(new (ys)
+MD5::MD5(const MD5& that) : Digest(), pimpl_(new
MD5Impl(that.pimpl_->md5_)) {}
@@ -116,14 +116,13 @@
};
-SHA::SHA() : pimpl_(new (ys) SHAImpl) {}
+SHA::SHA() : pimpl_(new SHAImpl) {}
SHA::~SHA() { delete pimpl_; }
-SHA::SHA(const SHA& that) : Digest(), pimpl_(new (ys)
- SHAImpl(that.pimpl_->sha_)) {}
+SHA::SHA(const SHA& that) : Digest(), pimpl_(new SHAImpl(that.pimpl_->sha_)) {}
SHA& SHA::operator=(const SHA& that)
{
@@ -174,14 +173,13 @@
};
-RMD::RMD() : pimpl_(new (ys) RMDImpl) {}
+RMD::RMD() : pimpl_(new RMDImpl) {}
RMD::~RMD() { delete pimpl_; }
-RMD::RMD(const RMD& that) : Digest(), pimpl_(new (ys)
- RMDImpl(that.pimpl_->rmd_)) {}
+RMD::RMD(const RMD& that) : Digest(), pimpl_(new RMDImpl(that.pimpl_->rmd_)) {}
RMD& RMD::operator=(const RMD& that)
{
@@ -232,7 +230,7 @@
HMAC_MD5::HMAC_MD5(const byte* secret, unsigned int len)
- : pimpl_(new (ys) HMAC_MD5Impl)
+ : pimpl_(new HMAC_MD5Impl)
{
pimpl_->mac_.SetKey(secret, len);
}
@@ -282,7 +280,7 @@
HMAC_SHA::HMAC_SHA(const byte* secret, unsigned int len)
- : pimpl_(new (ys) HMAC_SHAImpl)
+ : pimpl_(new HMAC_SHAImpl)
{
pimpl_->mac_.SetKey(secret, len);
}
@@ -333,7 +331,7 @@
HMAC_RMD::HMAC_RMD(const byte* secret, unsigned int len)
- : pimpl_(new (ys) HMAC_RMDImpl)
+ : pimpl_(new HMAC_RMDImpl)
{
pimpl_->mac_.SetKey(secret, len);
}
@@ -381,7 +379,7 @@
};
-DES::DES() : pimpl_(new (ys) DESImpl) {}
+DES::DES() : pimpl_(new DESImpl) {}
DES::~DES() { delete pimpl_; }
@@ -417,7 +415,7 @@
};
-DES_EDE::DES_EDE() : pimpl_(new (ys) DES_EDEImpl) {}
+DES_EDE::DES_EDE() : pimpl_(new DES_EDEImpl) {}
DES_EDE::~DES_EDE() { delete pimpl_; }
@@ -455,7 +453,7 @@
};
-RC4::RC4() : pimpl_(new (ys) RC4Impl) {}
+RC4::RC4() : pimpl_(new RC4Impl) {}
RC4::~RC4() { delete pimpl_; }
@@ -497,7 +495,7 @@
};
-AES::AES(unsigned int ks) : pimpl_(new (ys) AESImpl(ks)) {}
+AES::AES(unsigned int ks) : pimpl_(new AESImpl(ks)) {}
AES::~AES() { delete pimpl_; }
@@ -538,7 +536,7 @@
TaoCrypt::RandomNumberGenerator RNG_;
};
-RandomPool::RandomPool() : pimpl_(new (ys) RandomImpl) {}
+RandomPool::RandomPool() : pimpl_(new RandomImpl) {}
RandomPool::~RandomPool() { delete pimpl_; }
@@ -582,7 +580,7 @@
// Set public or private key
DSS::DSS(const byte* key, unsigned int sz, bool publicKey)
- : pimpl_(new (ys) DSSImpl)
+ : pimpl_(new DSSImpl)
{
if (publicKey)
pimpl_->SetPublic(key, sz);
@@ -653,7 +651,7 @@
// Set public or private key
RSA::RSA(const byte* key, unsigned int sz, bool publicKey)
- : pimpl_(new (ys) RSAImpl)
+ : pimpl_(new RSAImpl)
{
if (publicKey)
pimpl_->SetPublic(key, sz);
@@ -725,13 +723,13 @@
explicit IntegerImpl(const TaoCrypt::Integer& i) : int_(i) {}
};
-Integer::Integer() : pimpl_(new (ys) IntegerImpl) {}
+Integer::Integer() : pimpl_(new IntegerImpl) {}
Integer::~Integer() { delete pimpl_; }
-Integer::Integer(const Integer& other) : pimpl_(new (ys)
+Integer::Integer(const Integer& other) : pimpl_(new
IntegerImpl(other.pimpl_->int_))
{}
@@ -770,9 +768,9 @@
void AllocKeys(unsigned int pubSz, unsigned int privSz, unsigned int agrSz)
{
- publicKey_ = new (ys) byte[pubSz];
- privateKey_ = new (ys) byte[privSz];
- agreedKey_ = new (ys) byte[agrSz];
+ publicKey_ = new byte[pubSz];
+ privateKey_ = new byte[privSz];
+ agreedKey_ = new byte[agrSz];
}
};
@@ -781,7 +779,7 @@
/*
// server Side DH, server's view
DiffieHellman::DiffieHellman(const char* file, const RandomPool& random)
- : pimpl_(new (ys) DHImpl(random.pimpl_->RNG_))
+ : pimpl_(new DHImpl(random.pimpl_->RNG_))
{
using namespace TaoCrypt;
Source source;
@@ -805,12 +803,12 @@
DiffieHellman::DiffieHellman(const byte* p, unsigned int pSz, const byte* g,
unsigned int gSz, const byte* pub,
unsigned int pubSz, const RandomPool& random)
- : pimpl_(new (ys) DHImpl(random.pimpl_->RNG_))
+ : pimpl_(new DHImpl(random.pimpl_->RNG_))
{
using TaoCrypt::Integer;
pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref());
- pimpl_->publicKey_ = new (ys) opaque[pubSz];
+ pimpl_->publicKey_ = new opaque[pubSz];
memcpy(pimpl_->publicKey_, pub, pubSz);
}
@@ -818,7 +816,7 @@
// Server Side DH, server's view
DiffieHellman::DiffieHellman(const Integer& p, const Integer& g,
const RandomPool& random)
-: pimpl_(new (ys) DHImpl(random.pimpl_->RNG_))
+: pimpl_(new DHImpl(random.pimpl_->RNG_))
{
using TaoCrypt::Integer;
@@ -836,7 +834,7 @@
// Client side and view, use server that for p and g
DiffieHellman::DiffieHellman(const DiffieHellman& that)
- : pimpl_(new (ys) DHImpl(*that.pimpl_))
+ : pimpl_(new DHImpl(*that.pimpl_))
{
pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_,
pimpl_->publicKey_);
@@ -957,7 +955,7 @@
Base64Decoder b64Dec(der);
uint sz = der.size();
- mySTL::auto_ptr<x509> x(new (ys) x509(sz));
+ mySTL::auto_ptr<x509> x(new x509(sz));
memcpy(x->use_buffer(), der.get_buffer(), sz);
fclose(file);
@@ -971,8 +969,6 @@
template class TaoCrypt::HMAC<TaoCrypt::MD5>;
template class TaoCrypt::HMAC<TaoCrypt::SHA>;
template class TaoCrypt::HMAC<TaoCrypt::RIPEMD160>;
-template class TaoCrypt::Mode_BASE<16>;
-template class TaoCrypt::Mode_BASE<8>;
#endif
#endif // !USE_CRYPTOPP_LIB
--- 1.1/extra/yassl/src/handshake.cpp 2005-04-28 18:23:10 +05:00
+++ 1.2/extra/yassl/src/handshake.cpp 2005-05-25 00:15:00 +05:00
@@ -362,9 +362,9 @@
if (lastLen) times += 1;
if (hash == md5)
- hmac.reset(new (ys) HMAC_MD5(secret.get_buffer(), secret.get_size()));
+ hmac.reset(new HMAC_MD5(secret.get_buffer(), secret.get_size()));
else
- hmac.reset(new (ys) HMAC_SHA(secret.get_buffer(), secret.get_size()));
+ hmac.reset(new HMAC_SHA(secret.get_buffer(), secret.get_size()));
// A0 = seed
hmac->get_digest(previous, seed.get_buffer(), seed.get_size());// A1
uint lastTime = times - 1;
@@ -582,11 +582,11 @@
MACAlgorithm algo = ssl.getSecurity().get_parms().mac_algorithm_;
if (algo == sha)
- hmac.reset(new (ys) HMAC_SHA(ssl.get_macSecret(verify), SHA_LEN));
+ hmac.reset(new HMAC_SHA(ssl.get_macSecret(verify), SHA_LEN));
else if (algo == rmd)
- hmac.reset(new (ys) HMAC_RMD(ssl.get_macSecret(verify), RMD_LEN));
+ hmac.reset(new HMAC_RMD(ssl.get_macSecret(verify), RMD_LEN));
else
- hmac.reset(new (ys) HMAC_MD5(ssl.get_macSecret(verify), MD5_LEN));
+ hmac.reset(new HMAC_MD5(ssl.get_macSecret(verify), MD5_LEN));
hmac->update(seq, SEQ_SZ); // seq_num
inner[0] = content; // type
@@ -687,7 +687,7 @@
// make sure we have enough input in buffer to process this record
if (hdr.length_ > buffer.get_remaining()) {
uint sz = buffer.get_remaining() + RECORD_HEADER;
- buffered.reset(new (ys) input_buffer(sz, buffer.get_buffer() +
+ buffered.reset(new input_buffer(sz, buffer.get_buffer() +
buffer.get_current() - RECORD_HEADER, sz));
break;
}
@@ -760,7 +760,7 @@
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildHeaders(ssl, hsHeader, rlHeader, ck);
buildOutput(*out.get(), rlHeader, hsHeader, ck);
hashHandShake(ssl, *out.get());
@@ -781,7 +781,7 @@
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildHeaders(ssl, hsHeader, rlHeader, sk);
buildOutput(*out.get(), rlHeader, hsHeader, sk);
hashHandShake(ssl, *out.get());
@@ -806,7 +806,7 @@
ChangeCipherSpec ccs;
RecordLayerHeader rlHeader;
buildHeader(ssl, rlHeader, ccs);
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildOutput(*out.get(), rlHeader, ccs);
if (buffer == buffered)
@@ -823,7 +823,7 @@
Finished fin;
buildFinished(ssl, fin, side == client_end ? client : server);
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
cipherFinished(ssl, fin, *out.get()); // hashes handshake
if (ssl.getSecurity().get_resuming()) {
@@ -907,7 +907,7 @@
ServerHello sh(ssl.getSecurity().get_connection().version_);
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildServerHello(ssl, sh);
ssl.set_random(sh.get_random(), server_end);
@@ -930,7 +930,7 @@
ServerHelloDone shd;
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildHeaders(ssl, hsHeader, rlHeader, shd);
buildOutput(*out.get(), rlHeader, hsHeader, shd);
@@ -951,7 +951,7 @@
Certificate cert(ssl.getCrypto().get_certManager().get_cert());
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildHeaders(ssl, hsHeader, rlHeader, cert);
buildOutput(*out.get(), rlHeader, hsHeader, cert);
@@ -973,7 +973,7 @@
request.Build();
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildHeaders(ssl, hsHeader, rlHeader, request);
buildOutput(*out.get(), rlHeader, hsHeader, request);
@@ -995,7 +995,7 @@
verify.Build(ssl);
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(new (ys) output_buffer);
+ mySTL::auto_ptr<output_buffer> out(new output_buffer);
buildHeaders(ssl, hsHeader, rlHeader, verify);
buildOutput(*out.get(), rlHeader, hsHeader, verify);
--- 1.2/extra/yassl/src/ssl.cpp 2005-05-20 19:32:41 +05:00
+++ 1.3/extra/yassl/src/ssl.cpp 2005-05-25 00:15:00 +05:00
@@ -443,7 +443,7 @@
fseek(input, 0, SEEK_END);
long sz = ftell(input);
rewind(input);
- x = new (ys) x509(sz); // takes ownership
+ x = new x509(sz); // takes ownership
size_t bytes = fread(x->use_buffer(), sz, 1, input);
if (bytes != 1) {
fclose(input);
@@ -663,7 +663,7 @@
if (!retVal) {
created = true;
- bn.reset(new (ys) BIGNUM);
+ bn.reset(new BIGNUM);
retVal = bn.get();
}
--- 1.3/extra/yassl/src/yassl_imp.cpp 2005-05-05 19:19:22 +05:00
+++ 1.4/extra/yassl/src/yassl_imp.cpp 2005-05-25 00:15:00 +05:00
@@ -134,10 +134,10 @@
const CertManager& cert = ssl.getCrypto().get_certManager();
if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo)
- auth.reset(new (ys) RSA(cert.get_privateKey(),
+ auth.reset(new RSA(cert.get_privateKey(),
cert.get_privateKeyLength(), false));
else {
- auth.reset(new (ys) DSS(cert.get_privateKey(),
+ auth.reset(new DSS(cert.get_privateKey(),
cert.get_privateKeyLength(), false));
sigSz += DSS_ENCODED_EXTRA;
}
@@ -168,7 +168,7 @@
byte hash[FINISHED_SZ];
MD5 md5;
SHA sha;
- signature_ = new (ys) byte[sigSz];
+ signature_ = new byte[sigSz];
const Connection& conn = ssl.getSecurity().get_connection();
// md5
@@ -199,7 +199,7 @@
tmp.write(signature_, sigSz);
// key message
- keyMessage_ = new (ys) opaque[length_];
+ keyMessage_ = new opaque[length_];
memcpy(keyMessage_, tmp.get_buffer(), tmp.get_size());
}
@@ -253,7 +253,7 @@
void EncryptedPreMasterSecret::alloc(int sz)
{
length_ = sz;
- secret_ = new (ys) opaque[sz];
+ secret_ = new opaque[sz];
}
@@ -303,7 +303,7 @@
void ClientDiffieHellmanPublic::alloc(int sz, bool offset)
{
length_ = sz + (offset ? KEY_OFFSET : 0);
- Yc_ = new (ys) opaque[length_];
+ Yc_ = new opaque[length_];
}
@@ -348,7 +348,7 @@
tmp[1] = input[AUTO];
ato16(tmp, length);
- signature_ = new (ys) byte[length];
+ signature_ = new byte[length];
input.read(signature_, length);
// verify signature
@@ -386,7 +386,7 @@
}
// save input
- ssl.useCrypto().SetDH(new (ys) DiffieHellman(parms_.get_p(),
+ ssl.useCrypto().SetDH(new DiffieHellman(parms_.get_p(),
parms_.get_pSize(), parms_.get_g(), parms_.get_gSize(),
parms_.get_pub(), parms_.get_pubSize(),
ssl.getCrypto().get_random()));
@@ -928,7 +928,7 @@
// read data
if (dataSz) {
input_buffer* data;
- ssl.addData(data = new (ys) input_buffer(dataSz));
+ ssl.addData(data = new input_buffer(dataSz));
input.read(data->get_buffer(), dataSz);
data->add_size(dataSz);
@@ -1025,7 +1025,7 @@
c24to32(tmp, cert_sz);
x509* myCert;
- cm.AddPeerCert(myCert = new (ys) x509(cert_sz));
+ cm.AddPeerCert(myCert = new x509(cert_sz));
input.read(myCert->use_buffer(), myCert->get_length());
list_sz -= cert_sz + CERT_HEADER;
@@ -1111,21 +1111,21 @@
opaque* ServerDHParams::alloc_p(int sz)
{
- p_ = new (ys) opaque[pSz_ = sz];
+ p_ = new opaque[pSz_ = sz];
return p_;
}
opaque* ServerDHParams::alloc_g(int sz)
{
- g_ = new (ys) opaque[gSz_ = sz];
+ g_ = new opaque[gSz_ = sz];
return g_;
}
opaque* ServerDHParams::alloc_pub(int sz)
{
- Ys_ = new (ys) opaque[pubSz_ = sz];
+ Ys_ = new opaque[pubSz_ = sz];
return Ys_;
}
@@ -1537,7 +1537,7 @@
for (int j = 0; j < authCount; j++) {
int sz = REQUEST_HEADER + MIN_DIS_SIZE;
DistinguishedName dn;
- certificate_authorities_.push_back(dn = new (ys) byte[sz]);
+ certificate_authorities_.push_back(dn = new byte[sz]);
opaque tmp[REQUEST_HEADER];
c16toa(MIN_DIS_SIZE, tmp);
@@ -1584,7 +1584,7 @@
ato16(tmp, dnSz);
DistinguishedName dn;
- request.certificate_authorities_.push_back(dn = new (ys)
+ request.certificate_authorities_.push_back(dn = new
byte[REQUEST_HEADER + dnSz]);
memcpy(dn, tmp, REQUEST_HEADER);
input.read(&dn[REQUEST_HEADER], dnSz);
@@ -1665,7 +1665,7 @@
RSA rsa(cert.get_privateKey(), cert.get_privateKeyLength(), false);
sz = rsa.get_cipherLength() + VERIFY_HEADER;
- sig.reset(new (ys) byte[sz]);
+ sig.reset(new byte[sz]);
c16toa(sz - VERIFY_HEADER, len);
memcpy(sig.get(), len, VERIFY_HEADER);
@@ -1676,7 +1676,7 @@
DSS dss(cert.get_privateKey(), cert.get_privateKeyLength(), false);
sz = DSS_SIG_SZ + DSS_ENCODED_EXTRA + VERIFY_HEADER;
- sig.reset(new (ys) byte[sz]);
+ sig.reset(new byte[sz]);
c16toa(sz - VERIFY_HEADER, len);
memcpy(sig.get(), len, VERIFY_HEADER);
@@ -1714,7 +1714,7 @@
ato16(tmp, sz);
request.set_length(sz);
- request.signature_ = new (ys) byte[sz];
+ request.signature_ = new byte[sz];
input.read(request.signature_, sz);
return input;
@@ -1975,7 +1975,7 @@
void Connection::AllocPreSecret(uint sz)
{
- pre_master_secret_ = new (ys) opaque[pre_secret_len_ = sz];
+ pre_master_secret_ = new opaque[pre_secret_len_ = sz];
}
@@ -2011,35 +2011,35 @@
// Create functions for message factory
-Message* CreateCipherSpec() { return new (ys) ChangeCipherSpec; }
-Message* CreateAlert() { return new (ys) Alert; }
-Message* CreateHandShake() { return new (ys) HandShakeHeader; }
-Message* CreateData() { return new (ys) Data; }
+Message* CreateCipherSpec() { return new ChangeCipherSpec; }
+Message* CreateAlert() { return new Alert; }
+Message* CreateHandShake() { return new HandShakeHeader; }
+Message* CreateData() { return new Data; }
// Create functions for handshake factory
-HandShakeBase* CreateHelloRequest() { return new (ys) HelloRequest; }
-HandShakeBase* CreateClientHello() { return new (ys) ClientHello; }
-HandShakeBase* CreateServerHello() { return new (ys) ServerHello; }
-HandShakeBase* CreateCertificate() { return new (ys) Certificate; }
-HandShakeBase* CreateServerKeyExchange() { return new (ys) ServerKeyExchange;}
-HandShakeBase* CreateCertificateRequest() { return new (ys)
+HandShakeBase* CreateHelloRequest() { return new HelloRequest; }
+HandShakeBase* CreateClientHello() { return new ClientHello; }
+HandShakeBase* CreateServerHello() { return new ServerHello; }
+HandShakeBase* CreateCertificate() { return new Certificate; }
+HandShakeBase* CreateServerKeyExchange() { return new ServerKeyExchange;}
+HandShakeBase* CreateCertificateRequest() { return new
CertificateRequest; }
-HandShakeBase* CreateServerHelloDone() { return new (ys) ServerHelloDone; }
-HandShakeBase* CreateCertificateVerify() { return new (ys) CertificateVerify;}
-HandShakeBase* CreateClientKeyExchange() { return new (ys) ClientKeyExchange;}
-HandShakeBase* CreateFinished() { return new (ys) Finished; }
+HandShakeBase* CreateServerHelloDone() { return new ServerHelloDone; }
+HandShakeBase* CreateCertificateVerify() { return new CertificateVerify;}
+HandShakeBase* CreateClientKeyExchange() { return new ClientKeyExchange;}
+HandShakeBase* CreateFinished() { return new Finished; }
// Create functions for server key exchange factory
-ServerKeyBase* CreateRSAServerKEA() { return new (ys) RSA_Server; }
-ServerKeyBase* CreateDHServerKEA() { return new (ys) DH_Server; }
-ServerKeyBase* CreateFortezzaServerKEA() { return new (ys) Fortezza_Server; }
+ServerKeyBase* CreateRSAServerKEA() { return new RSA_Server; }
+ServerKeyBase* CreateDHServerKEA() { return new DH_Server; }
+ServerKeyBase* CreateFortezzaServerKEA() { return new Fortezza_Server; }
// Create functions for client key exchange factory
-ClientKeyBase* CreateRSAClient() { return new (ys)
+ClientKeyBase* CreateRSAClient() { return new
EncryptedPreMasterSecret; }
-ClientKeyBase* CreateDHClient() { return new (ys)
+ClientKeyBase* CreateDHClient() { return new
ClientDiffieHellmanPublic; }
-ClientKeyBase* CreateFortezzaClient() { return new (ys) FortezzaKeys; }
+ClientKeyBase* CreateFortezzaClient() { return new FortezzaKeys; }
// Constructor calls this to Register compile time callbacks
@@ -2115,4 +2115,3 @@
template yaSSL::del_ptr_zero mySTL::for_each<mySTL::list<yaSSL::x509*>::iterator, yaSSL::del_ptr_zero>(mySTL::list<yaSSL::x509*>::iterator, mySTL::list<yaSSL::x509*>::iterator, yaSSL::del_ptr_zero);
}
#endif
-
--- 1.4/extra/yassl/src/yassl_int.cpp 2005-05-06 20:54:27 +05:00
+++ 1.5/extra/yassl/src/yassl_int.cpp 2005-05-25 00:15:00 +05:00
@@ -31,28 +31,6 @@
#include "openssl/ssl.h" // for DH
-void* operator new(size_t sz, yaSSL::new_t)
-{
- void* ptr = ::operator new(sz);
-
- if (!ptr) abort();
-
- return ptr;
-}
-
-void* operator new[](size_t sz, yaSSL::new_t n)
-{
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
- void* ptr = ::operator new(sz); // no ::operator new[]
-#else
- void* ptr = ::operator new[](sz);
-#endif
-
- if (!ptr) abort();
-
- return ptr;
-}
-
namespace yaSSL {
@@ -60,8 +38,6 @@
using mySTL::min;
-new_t ys; // for library new
-
// convert a 32 bit integer into a 24 bit one
void c32to24(uint32 u32, uint24& u24)
@@ -308,8 +284,8 @@
parms.key_size_ = AES_256_KEY_SZ;
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) AES(AES_256_KEY_SZ));
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new AES(AES_256_KEY_SZ));
strncpy(parms.cipher_name_, cipher_names[TLS_RSA_WITH_AES_256_CBC_SHA],
MAX_SUITE_NAME);
break;
@@ -322,8 +298,8 @@
parms.key_size_ = AES_128_KEY_SZ;
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) AES);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new AES);
strncpy(parms.cipher_name_, cipher_names[TLS_RSA_WITH_AES_128_CBC_SHA],
MAX_SUITE_NAME);
break;
@@ -336,8 +312,8 @@
parms.key_size_ = DES_EDE_KEY_SZ;
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) DES_EDE);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new DES_EDE);
strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_3DES_EDE_CBC_SHA]
, MAX_SUITE_NAME);
break;
@@ -350,8 +326,8 @@
parms.key_size_ = DES_KEY_SZ;
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) DES);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new DES);
strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_DES_CBC_SHA],
MAX_SUITE_NAME);
break;
@@ -364,8 +340,8 @@
parms.key_size_ = RC4_KEY_SZ;
parms.iv_size_ = 0;
parms.cipher_type_ = stream;
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) RC4);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new RC4);
strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_RC4_128_SHA],
MAX_SUITE_NAME);
break;
@@ -378,8 +354,8 @@
parms.key_size_ = RC4_KEY_SZ;
parms.iv_size_ = 0;
parms.cipher_type_ = stream;
- crypto_.setDigest(new (ys) MD5);
- crypto_.setCipher(new (ys) RC4);
+ crypto_.setDigest(new MD5);
+ crypto_.setCipher(new RC4);
strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_RC4_128_MD5],
MAX_SUITE_NAME);
break;
@@ -394,8 +370,8 @@
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) DES);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new DES);
strncpy(parms.cipher_name_, cipher_names[SSL_DHE_RSA_WITH_DES_CBC_SHA],
MAX_SUITE_NAME);
break;
@@ -410,8 +386,8 @@
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) DES_EDE);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new DES_EDE);
strncpy(parms.cipher_name_,
cipher_names[SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA], MAX_SUITE_NAME);
break;
@@ -426,8 +402,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) AES(AES_256_KEY_SZ));
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new AES(AES_256_KEY_SZ));
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_RSA_WITH_AES_256_CBC_SHA], MAX_SUITE_NAME);
break;
@@ -442,8 +418,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) AES);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new AES);
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_RSA_WITH_AES_128_CBC_SHA], MAX_SUITE_NAME);
break;
@@ -458,8 +434,8 @@
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) DES);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new DES);
strncpy(parms.cipher_name_, cipher_names[SSL_DHE_DSS_WITH_DES_CBC_SHA],
MAX_SUITE_NAME);
break;
@@ -474,8 +450,8 @@
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) DES_EDE);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new DES_EDE);
strncpy(parms.cipher_name_,
cipher_names[SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA], MAX_SUITE_NAME);
break;
@@ -490,8 +466,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) AES(AES_256_KEY_SZ));
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new AES(AES_256_KEY_SZ));
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_DSS_WITH_AES_256_CBC_SHA], MAX_SUITE_NAME);
break;
@@ -506,8 +482,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) SHA);
- crypto_.setCipher(new (ys) AES);
+ crypto_.setDigest(new SHA);
+ crypto_.setCipher(new AES);
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_DSS_WITH_AES_128_CBC_SHA], MAX_SUITE_NAME);
break;
@@ -520,8 +496,8 @@
parms.key_size_ = AES_256_KEY_SZ;
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) AES(AES_256_KEY_SZ));
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new AES(AES_256_KEY_SZ));
strncpy(parms.cipher_name_,
cipher_names[TLS_RSA_WITH_AES_256_CBC_RMD160], MAX_SUITE_NAME);
break;
@@ -534,8 +510,8 @@
parms.key_size_ = AES_128_KEY_SZ;
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) AES);
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new AES);
strncpy(parms.cipher_name_,
cipher_names[TLS_RSA_WITH_AES_128_CBC_RMD160], MAX_SUITE_NAME);
break;
@@ -548,8 +524,8 @@
parms.key_size_ = DES_EDE_KEY_SZ;
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) DES_EDE);
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new DES_EDE);
strncpy(parms.cipher_name_,
cipher_names[TLS_RSA_WITH_3DES_EDE_CBC_RMD160], MAX_SUITE_NAME);
break;
@@ -564,8 +540,8 @@
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) DES_EDE);
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new DES_EDE);
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160],
MAX_SUITE_NAME);
@@ -581,8 +557,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) AES(AES_256_KEY_SZ));
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new AES(AES_256_KEY_SZ));
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_RSA_WITH_AES_256_CBC_RMD160],
MAX_SUITE_NAME);
@@ -598,8 +574,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) AES);
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new AES);
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_RSA_WITH_AES_128_CBC_RMD160],
MAX_SUITE_NAME);
@@ -615,8 +591,8 @@
parms.iv_size_ = DES_IV_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) DES_EDE);
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new DES_EDE);
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160],
MAX_SUITE_NAME);
@@ -632,8 +608,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) AES(AES_256_KEY_SZ));
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new AES(AES_256_KEY_SZ));
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_DSS_WITH_AES_256_CBC_RMD160],
MAX_SUITE_NAME);
@@ -649,8 +625,8 @@
parms.iv_size_ = AES_BLOCK_SZ;
parms.cipher_type_ = block;
secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(new (ys) RMD);
- crypto_.setCipher(new (ys) AES);
+ crypto_.setDigest(new RMD);
+ crypto_.setCipher(new AES);
strncpy(parms.cipher_name_,
cipher_names[TLS_DHE_DSS_WITH_AES_128_CBC_RMD160],
MAX_SUITE_NAME);
@@ -936,12 +912,14 @@
} // namespace for locals
using namespace yassl_int_cpp_local1;
+
uint SSL::bufferedData()
{
return mySTL::for_each(buffers_.getData().begin(),buffers_.getData().end(),
SumData()).total_;
}
+
// use input buffer to fill data
void SSL::fillData(Data& data)
{
@@ -1367,7 +1345,7 @@
void Sessions::add(const SSL& ssl)
{
Lock guard(mutex_);
- list_.push_back(new (ys) SSL_SESSION(ssl, random_));
+ list_.push_back(new SSL_SESSION(ssl, random_));
}
@@ -1397,6 +1375,7 @@
} // local namespace
using namespace yassl_int_cpp_local2;
+
// lookup session by id, return a copy if space provided
SSL_SESSION* Sessions::lookup(const opaque* id, SSL_SESSION* copy)
{
@@ -1764,7 +1743,7 @@
void Crypto::SetDH(const DH_Parms& dh)
{
if (dh.set_)
- dh_ = new (ys) DiffieHellman(dh.p_, dh.g_, random_);
+ dh_ = new DiffieHellman(dh.p_, dh.g_, random_);
}
@@ -1931,7 +1910,7 @@
: name_(0)
{
if (sz) {
- name_ = new (ys) char[sz];
+ name_ = new char[sz];
memcpy(name_, n, sz);
}
}
@@ -1952,7 +1931,7 @@
X509::X509(const char* i, size_t iSz, const char* s, size_t sSz)
: issuer_(i, iSz), subject_(s, sSz)
{}
-
+
X509_NAME* X509::GetIssuer()
{
--- 1.1/extra/yassl/taocrypt/include/aes.hpp 2005-04-28 18:23:12 +05:00
+++ 1.2/extra/yassl/taocrypt/include/aes.hpp 2005-05-25 00:15:00 +05:00
@@ -37,11 +37,12 @@
// AES encryption and decryption, see FIPS-197
-class AES : public Mode_BASE<AES_BLOCK_SIZE> {
+class AES : public Mode_BASE {
public:
enum { BLOCK_SIZE = AES_BLOCK_SIZE };
- AES(CipherDir DIR, Mode MODE) : dir_(DIR), mode_(MODE) {}
+ AES(CipherDir DIR, Mode MODE)
+ : Mode_BASE(BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
void Process(byte*, const byte*, word32);
void SetKey(const byte* iv, word32 sz, CipherDir fake = ENCRYPTION);
--- 1.1/extra/yassl/taocrypt/include/algebra.hpp 2005-04-28 18:23:12 +05:00
+++ 1.2/extra/yassl/taocrypt/include/algebra.hpp 2005-05-25 00:15:00 +05:00
@@ -24,11 +24,10 @@
#ifndef TAO_CRYPT_ALGEBRA_HPP
#define TAO_CRYPT_ALGEBRA_HPP
-#include "misc.hpp"
+#include "integer.hpp"
namespace TaoCrypt {
-class Integer;
// "const Element&" returned by member functions are references
// to internal data members. Since each object may have only
@@ -38,11 +37,11 @@
// But this should be fine:
// abcd = group.Add(a, group.Add(b, group.Add(c,d));
-//! Abstract Group
-template <class T> class TAOCRYPT_NO_VTABLE AbstractGroup
+// Abstract Group
+class TAOCRYPT_NO_VTABLE AbstractGroup
{
public:
- typedef T Element;
+ typedef Integer Element;
virtual ~AbstractGroup() {}
@@ -65,15 +64,14 @@
const Integer *exponents, unsigned int exponentsCount) const;
};
-//! Abstract Ring
-template <class T> class TAOCRYPT_NO_VTABLE AbstractRing
- : public AbstractGroup<T>
+// Abstract Ring
+class TAOCRYPT_NO_VTABLE AbstractRing : public AbstractGroup
{
public:
- typedef T Element;
+ typedef Integer Element;
AbstractRing() {m_mg.m_pRing = this;}
- AbstractRing(const AbstractRing &source) {m_mg.m_pRing = this;}
+ AbstractRing(const AbstractRing &source) : AbstractGroup() {m_mg.m_pRing = this;}
AbstractRing& operator=(const AbstractRing &source) {return *this;}
virtual bool IsUnit(const Element &a) const =0;
@@ -91,14 +89,14 @@
virtual void SimultaneousExponentiate(Element *results, const Element&,
const Integer *exponents, unsigned int exponentsCount) const;
- virtual const AbstractGroup<T>& MultiplicativeGroup() const
+ virtual const AbstractGroup& MultiplicativeGroup() const
{return m_mg;}
private:
- class MultiplicativeGroupT : public AbstractGroup<T>
+ class MultiplicativeGroupT : public AbstractGroup
{
public:
- const AbstractRing<T>& GetRing() const
+ const AbstractRing& GetRing() const
{return *m_pRing;}
bool Equal(const Element &a, const Element &b) const
@@ -137,44 +135,19 @@
{GetRing().SimultaneousExponentiate(results, base, exponents,
exponentsCount);}
- const AbstractRing<T> *m_pRing;
+ const AbstractRing* m_pRing;
};
MultiplicativeGroupT m_mg;
};
-// ********************************************************
-//! Base and Exponent
-template <class T, class E = Integer>
-struct BaseAndExponent
+// Abstract Euclidean Domain
+class TAOCRYPT_NO_VTABLE AbstractEuclideanDomain
+ : public AbstractRing
{
public:
- BaseAndExponent() {}
- BaseAndExponent(const T &base, const E &exponent) : base(base),
- exponent(exponent) {}
- bool operator<(const BaseAndExponent<T, E> &rhs) const
- {return exponent < rhs.exponent;}
- T base;
- E exponent;
-};
-
-// VC60 workaround: incomplete member template support
-template <class Element, class Iterator>
- Element GeneralCascadeMultiplication(const AbstractGroup<Element> &group,
- Iterator begin, Iterator end);
-template <class Element, class Iterator>
- Element GeneralCascadeExponentiation(const AbstractRing<Element> &ring,
- Iterator begin, Iterator end);
-
-// ********************************************************
-
-//! Abstract Euclidean Domain
-template <class T> class TAOCRYPT_NO_VTABLE AbstractEuclideanDomain
- : public AbstractRing<T>
-{
-public:
- typedef T Element;
+ typedef Integer Element;
virtual void DivisionAlgorithm(Element &r, Element &q, const Element &a,
const Element &d) const =0;
@@ -186,13 +159,12 @@
mutable Element result;
};
-// ********************************************************
-//! EuclideanDomainOf
-template <class T> class EuclideanDomainOf : public AbstractEuclideanDomain<T>
+// EuclideanDomainOf
+class EuclideanDomainOf : public AbstractEuclideanDomain
{
public:
- typedef T Element;
+ typedef Integer Element;
EuclideanDomainOf() {}
@@ -249,68 +221,8 @@
mutable Element result;
};
-//! Quotient Ring
-template<class T> class QuotientRing : public AbstractRing<typename T::Element>
-{
-public:
- typedef T EuclideanDomain;
- typedef typename T::Element Element;
-
- QuotientRing(const EuclideanDomain &domain, const Element &modulus)
- : m_domain(domain), m_modulus(modulus) {}
-
- const EuclideanDomain & GetDomain() const
- {return m_domain;}
-
- const Element& GetModulus() const
- {return m_modulus;}
-
- bool Equal(const Element &a, const Element &b) const
- {return m_domain.Equal(m_domain.Mod(m_domain.Subtract(a, b),
- m_modulus), m_domain.Identity());}
-
- const Element& Identity() const
- {return m_domain.Identity();}
-
- const Element& Add(const Element &a, const Element &b) const
- {return m_domain.Add(a, b);}
-
- Element& Accumulate(Element &a, const Element &b) const
- {return m_domain.Accumulate(a, b);}
-
- const Element& Inverse(const Element &a) const
- {return m_domain.Inverse(a);}
-
- const Element& Subtract(const Element &a, const Element &b) const
- {return m_domain.Subtract(a, b);}
-
- Element& Reduce(Element &a, const Element &b) const
- {return m_domain.Reduce(a, b);}
-
- const Element& Double(const Element &a) const
- {return m_domain.Double(a);}
-
- bool IsUnit(const Element &a) const
- {return m_domain.IsUnit(m_domain.Gcd(a, m_modulus));}
-
- const Element& MultiplicativeIdentity() const
- {return m_domain.MultiplicativeIdentity();}
-
- const Element& Multiply(const Element &a, const Element &b) const
- {return m_domain.Mod(m_domain.Multiply(a, b), m_modulus);}
-
- const Element& Square(const Element &a) const
- {return m_domain.Mod(m_domain.Square(a), m_modulus);}
-
- const Element& MultiplicativeInverse(const Element &a) const;
-
-protected:
- EuclideanDomain m_domain;
- Element m_modulus;
-};
} // namespace
-
#endif // TAO_CRYPT_ALGEBRA_HPP
--- 1.2/extra/yassl/taocrypt/include/block.hpp 2005-05-20 19:32:41 +05:00
+++ 1.3/extra/yassl/taocrypt/include/block.hpp 2005-05-25 00:15:00 +05:00
@@ -34,10 +34,6 @@
#include <stddef.h> // ptrdiff_t
-#if defined(_MSC_VER) && defined(_CRTAPI1)
-#define TAOCRYPT_MSVCRT6
-#endif
-
namespace TaoCrypt {
@@ -47,13 +43,13 @@
class AllocatorBase
{
public:
- typedef T value_type;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef T* pointer;
- typedef const T* const_pointer;
- typedef T& reference;
- typedef const T& const_reference;
+ typedef T value_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef const T* const_pointer;
+ typedef T& reference;
+ typedef const T& const_reference;
pointer address(reference r) const {return (&r);}
const_pointer address(const_reference r) const {return (&r); }
@@ -104,7 +100,7 @@
CheckSize(n);
if (n == 0)
return 0;
- return new (tc) T[n];
+ return new T[n];
}
void deallocate(void* p, size_type n)
--- 1.1/extra/yassl/taocrypt/include/des.hpp 2005-04-28 18:23:13 +05:00
+++ 1.2/extra/yassl/taocrypt/include/des.hpp 2005-05-25 00:15:01 +05:00
@@ -36,12 +36,13 @@
enum { DES_BLOCK_SIZE = 8 };
// Base for all DES types
-class DES_BASE : public Mode_BASE<DES_BLOCK_SIZE> {
+class DES_BASE : public Mode_BASE {
public:
enum { BLOCK_SIZE = DES_BLOCK_SIZE, KEY_SIZE = 32, BOXES = 8,
BOX_SIZE = 64 };
- DES_BASE(CipherDir DIR, Mode MODE) : dir_(DIR), mode_(MODE) {}
+ DES_BASE(CipherDir DIR, Mode MODE)
+ : Mode_BASE(BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
void Process(byte*, const byte*, word32);
protected:
--- 1.2/extra/yassl/taocrypt/include/error.hpp 2005-05-20 01:44:00 +05:00
+++ 1.3/extra/yassl/taocrypt/include/error.hpp 2005-05-25 00:15:01 +05:00
@@ -65,7 +65,8 @@
DSA_SZ_E = 1035, // "bad DSA r or s size"
BEFORE_DATE_E = 1036, // "before date in the future"
AFTER_DATE_E = 1037, // "after date in the past"
-SIG_CONFIRM_E = 1038 // "bad signature confirmation"
+SIG_CONFIRM_E = 1038, // "bad self signature confirmation"
+SIG_OTHER_E = 1039 // "bad other signature confirmation"
};
--- 1.1/extra/yassl/taocrypt/include/hash.hpp 2005-04-28 18:23:14 +05:00
+++ 1.2/extra/yassl/taocrypt/include/hash.hpp 2005-05-25 00:15:01 +05:00
@@ -50,7 +50,7 @@
class HASHwithTransform : public HASH {
public:
HASHwithTransform(word32 digSz, word32 buffSz)
- : digest_(new (tc) word32[digSz]), buffer_(new (tc) byte[buffSz]) {}
+ : digest_(new word32[digSz]), buffer_(new byte[buffSz]) {}
virtual ~HASHwithTransform() { delete[] buffer_; delete[] digest_; }
virtual ByteOrder getByteOrder() const = 0;
--- 1.3/extra/yassl/taocrypt/include/integer.hpp 2005-05-20 19:32:42 +05:00
+++ 1.4/extra/yassl/taocrypt/include/integer.hpp 2005-05-25 00:15:01 +05:00
@@ -29,8 +29,8 @@
#include "block.hpp"
#include "random.hpp"
#include "file.hpp"
-#include <string.h>
#include "algorithm.hpp" // mySTL::swap
+#include <string.h>
#ifdef TAOCRYPT_X86ASM_AVAILABLE
@@ -128,9 +128,6 @@
Integer(signed long value);
Integer(Sign s, word highWord, word lowWord);
- explicit Integer(const char* str);
- explicit Integer(const wchar_t* str);
-
// BER Decode Source
explicit Integer(Source&);
@@ -254,15 +251,13 @@
private:
friend class ModularArithmetic;
friend class MontgomeryRepresentation;
- friend class HalfMontgomeryRepresentation;
-
Integer(word value, unsigned int length);
static const Integer zero;
static const Integer one;
static const Integer two;
-
int PositiveCompare(const Integer& t) const;
+
friend void PositiveAdd(Integer& sum, const Integer& a, const Integer& b);
friend void PositiveSubtract(Integer& diff, const Integer& a,
const Integer& b);
@@ -308,6 +303,7 @@
Integer CRT(const Integer& xp, const Integer& p, const Integer& xq,
const Integer& q, const Integer& u);
+
inline Integer ModularExponentiation(const Integer& a, const Integer& e,
const Integer& m)
{
--- 1.3/extra/yassl/taocrypt/include/misc.hpp 2005-05-22 07:16:35 +05:00
+++ 1.4/extra/yassl/taocrypt/include/misc.hpp 2005-05-25 00:15:01 +05:00
@@ -28,17 +28,6 @@
#include <assert.h>
#include <string.h>
-namespace TaoCrypt {
-
-// library allocation
-struct new_t {}; // TaoCrypt New type
-extern new_t tc; // pass in parameter
-
-} // namespace TaoCrypt
-
-void* operator new (size_t, TaoCrypt::new_t);
-void* operator new[](size_t, TaoCrypt::new_t);
-
namespace TaoCrypt {
--- 1.1/extra/yassl/taocrypt/include/modarith.hpp 2005-04-28 18:23:15 +05:00
+++ 1.2/extra/yassl/taocrypt/include/modarith.hpp 2005-05-25 00:15:01 +05:00
@@ -27,14 +27,13 @@
#define TAO_CRYPT_MODARITH_HPP
#include "misc.hpp"
-#include "integer.hpp"
#include "algebra.hpp"
namespace TaoCrypt {
-//! ModularArithmetic
-class ModularArithmetic : public AbstractRing<Integer>
+// ModularArithmetic
+class ModularArithmetic : public AbstractRing
{
public:
@@ -45,7 +44,7 @@
: modulus(modulus), result((word)0, modulus.reg_.size()) {}
ModularArithmetic(const ModularArithmetic &ma)
- : AbstractRing<Integer>(),
+ : AbstractRing(),
modulus(ma.modulus), result((word)0, modulus.reg_.size()) {}
const Integer& GetModulus() const {return modulus;}
@@ -149,12 +148,12 @@
Integer CascadeExponentiate(const Integer &x, const Integer &e1,
const Integer &y, const Integer &e2) const
- {return AbstractRing<Integer>::CascadeExponentiate(x, e1, y, e2);}
+ {return AbstractRing::CascadeExponentiate(x, e1, y, e2);}
void SimultaneousExponentiate(Element *results, const Element &base,
const Integer *exponents, unsigned int exponentsCount) const
- {AbstractRing<Integer>::SimultaneousExponentiate(results, base,
- exponents, exponentsCount);}
+ {AbstractRing::SimultaneousExponentiate(results, base,
+ exponents, exponentsCount);}
private:
Integer u;
--- 1.1/extra/yassl/taocrypt/include/modes.hpp 2005-04-28 18:23:16 +05:00
+++ 1.2/extra/yassl/taocrypt/include/modes.hpp 2005-05-25 00:15:01 +05:00
@@ -56,10 +56,11 @@
// Mode Base for block ciphers, static size
-template<int BLOCK_SIZE>
class Mode_BASE {
public:
- Mode_BASE() {}
+ enum { MaxBlockSz = 16 };
+
+ explicit Mode_BASE(int sz) : blockSz_(sz) { assert(sz <= MaxBlockSz); }
virtual ~Mode_BASE() {}
virtual void ProcessAndXorBlock(const byte*, const byte*, byte*) const = 0;
@@ -68,10 +69,11 @@
void CBC_Encrypt(byte*, const byte*, word32);
void CBC_Decrypt(byte*, const byte*, word32);
- void SetIV(const byte* iv) { memcpy(reg_, iv, BLOCK_SIZE); }
+ void SetIV(const byte* iv) { memcpy(reg_, iv, blockSz_); }
private:
- byte reg_[BLOCK_SIZE];
- byte tmp_[BLOCK_SIZE];
+ byte reg_[MaxBlockSz];
+ byte tmp_[MaxBlockSz];
+ int blockSz_;
Mode_BASE(const Mode_BASE&); // hide copy
Mode_BASE& operator=(const Mode_BASE&); // and assign
@@ -79,51 +81,48 @@
// ECB Process blocks
-template<int BLOCK_SIZE>
-void Mode_BASE<BLOCK_SIZE>::ECB_Process(byte* out, const byte* in, word32 sz)
+inline void Mode_BASE::ECB_Process(byte* out, const byte* in, word32 sz)
{
- word32 blocks = sz / BLOCK_SIZE;
+ word32 blocks = sz / blockSz_;
while (blocks--) {
ProcessAndXorBlock(in, 0, out);
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
+ out += blockSz_;
+ in += blockSz_;
}
}
// CBC Encrypt
-template<int BLOCK_SIZE>
-void Mode_BASE<BLOCK_SIZE>::CBC_Encrypt(byte* out, const byte* in, word32 sz)
+inline void Mode_BASE::CBC_Encrypt(byte* out, const byte* in, word32 sz)
{
- word32 blocks = sz / BLOCK_SIZE;
+ word32 blocks = sz / blockSz_;
while (blocks--) {
- xorbuf(reg_, in, BLOCK_SIZE);
+ xorbuf(reg_, in, blockSz_);
ProcessAndXorBlock(reg_, 0, reg_);
- memcpy(out, reg_, BLOCK_SIZE);
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
+ memcpy(out, reg_, blockSz_);
+ out += blockSz_;
+ in += blockSz_;
}
}
// CBC Decrypt
-template<int BLOCK_SIZE>
-void Mode_BASE<BLOCK_SIZE>::CBC_Decrypt(byte* out, const byte* in, word32 sz)
+inline void Mode_BASE::CBC_Decrypt(byte* out, const byte* in, word32 sz)
{
- word32 blocks = sz / BLOCK_SIZE;
- byte hold[BLOCK_SIZE];
+ word32 blocks = sz / blockSz_;
+ byte hold[MaxBlockSz];
while (blocks--) {
- memcpy(tmp_, in, BLOCK_SIZE);
+ memcpy(tmp_, in, blockSz_);
ProcessAndXorBlock(tmp_, 0, out);
- xorbuf(out, reg_, BLOCK_SIZE);
- memcpy(hold, reg_, BLOCK_SIZE); // swap reg_ and tmp_
- memcpy(reg_, tmp_, BLOCK_SIZE);
- memcpy(tmp_, hold, BLOCK_SIZE);
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
+ xorbuf(out, reg_, blockSz_);
+ memcpy(hold, reg_, blockSz_); // swap reg_ and tmp_
+ memcpy(reg_, tmp_, blockSz_);
+ memcpy(tmp_, hold, blockSz_);
+ out += blockSz_;
+ in += blockSz_;
}
}
--- 1.1/extra/yassl/taocrypt/src/algebra.cpp 2005-04-28 18:23:18 +05:00
+++ 1.2/extra/yassl/taocrypt/src/algebra.cpp 2005-05-25 00:15:01 +05:00
@@ -23,60 +23,58 @@
#include "runtime.hpp"
#include "algebra.hpp"
-#include "integer.hpp"
#include "vector.hpp" // mySTL::vector (simple)
namespace TaoCrypt {
-template <class T> const T& AbstractGroup<T>::Double(const Element &a) const
+
+const Integer& AbstractGroup::Double(const Element &a) const
{
return Add(a, a);
}
-template <class T> const T& AbstractGroup<T>::Subtract(const Element &a,
- const Element &b) const
+const Integer& AbstractGroup::Subtract(const Element &a, const Element &b) const
{
// make copy of a in case Inverse() overwrites it
Element a1(a);
return Add(a1, Inverse(b));
}
-template <class T> T& AbstractGroup<T>::Accumulate(Element &a,
- const Element &b) const
+Integer& AbstractGroup::Accumulate(Element &a, const Element &b) const
{
return a = Add(a, b);
}
-template <class T> T& AbstractGroup<T>::Reduce(Element &a,
- const Element &b) const
+Integer& AbstractGroup::Reduce(Element &a, const Element &b) const
{
return a = Subtract(a, b);
}
-template <class T> const T& AbstractRing<T>::Square(const Element &a) const
+const Integer& AbstractRing::Square(const Element &a) const
{
return Multiply(a, a);
}
-template <class T> const T& AbstractRing<T>::Divide(const Element &a,
- const Element &b) const
+
+const Integer& AbstractRing::Divide(const Element &a, const Element &b) const
{
// make copy of a in case MultiplicativeInverse() overwrites it
Element a1(a);
return Multiply(a1, MultiplicativeInverse(b));
}
-template <class T> const T& AbstractEuclideanDomain<T>::Mod(const Element &a,
- const Element &b) const
+
+const Integer& AbstractEuclideanDomain::Mod(const Element &a,
+ const Element &b) const
{
Element q;
DivisionAlgorithm(result, q, a, b);
return result;
}
-template <class T> const T& AbstractEuclideanDomain<T>::Gcd(const Element &a,
- const Element &b) const
+const Integer& AbstractEuclideanDomain::Gcd(const Element &a,
+ const Element &b) const
{
Element g[3]={b, a};
unsigned int i0=0, i1=1, i2=2;
@@ -90,45 +88,17 @@
return result = g[i0];
}
-template <class T> const typename
- QuotientRing<T>::Element& QuotientRing<T>::MultiplicativeInverse(
- const Element &a) const
-{
- Element g[3]={m_modulus, a};
-#ifdef __BCPLUSPLUS__
- // BC++50 workaround
- Element v[3];
- v[0]=m_domain.Identity();
- v[1]=m_domain.MultiplicativeIdentity();
-#else
- Element v[3]={m_domain.Identity(), m_domain.MultiplicativeIdentity()};
-#endif
- Element y;
- unsigned int i0=0, i1=1, i2=2;
-
- while (!Equal(g[i1], Identity()))
- {
- // y = g[i0] / g[i1];
- // g[i2] = g[i0] % g[i1];
- m_domain.DivisionAlgorithm(g[i2], y, g[i0], g[i1]);
- // v[i2] = v[i0] - (v[i1] * y);
- v[i2] = m_domain.Subtract(v[i0], m_domain.Multiply(v[i1], y));
- unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;
- }
-
- return m_domain.IsUnit(g[i0]) ? m_domain.Divide(v[i0], g[i0]) :
- m_domain.Identity();
-}
-template <class T> T AbstractGroup<T>::ScalarMultiply(const Element &base,
- const Integer &exponent) const
+Integer AbstractGroup::ScalarMultiply(const Element &base,
+ const Integer &exponent) const
{
Element result;
SimultaneousMultiply(&result, base, &exponent, 1);
return result;
}
-template <class T> T AbstractGroup<T>::CascadeScalarMultiply(const Element &x,
+
+Integer AbstractGroup::CascadeScalarMultiply(const Element &x,
const Integer &e1, const Element &y, const Integer &e2) const
{
const unsigned expLen = max(e1.BitCount(), e2.BitCount());
@@ -258,8 +228,8 @@
bool fastNegate, negateNext, firstTime, finished;
};
-template <class T>
-void AbstractGroup<T>::SimultaneousMultiply(T *results, const T &base,
+
+void AbstractGroup::SimultaneousMultiply(Integer *results, const Integer &base,
const Integer *expBegin, unsigned int expCount) const
{
mySTL::vector<mySTL::vector<Element> > buckets(expCount);
@@ -321,34 +291,39 @@
}
}
-template <class T> T AbstractRing<T>::Exponentiate(const Element &base,
- const Integer &exponent) const
+Integer AbstractRing::Exponentiate(const Element &base,
+ const Integer &exponent) const
{
Element result;
SimultaneousExponentiate(&result, base, &exponent, 1);
return result;
}
-template <class T> T AbstractRing<T>::CascadeExponentiate(const Element &x,
+
+Integer AbstractRing::CascadeExponentiate(const Element &x,
const Integer &e1, const Element &y, const Integer &e2) const
{
- return MultiplicativeGroup().AbstractGroup<T>::CascadeScalarMultiply(
+ return MultiplicativeGroup().AbstractGroup::CascadeScalarMultiply(
x, e1, y, e2);
}
-template <class Element, class Iterator> Element GeneralCascadeExponentiation(
- const AbstractRing<Element> &ring, Iterator begin, Iterator end)
-{
- return GeneralCascadeMultiplication<Element>(ring.MultiplicativeGroup(),
- begin, end);
-}
-template <class T>
-void AbstractRing<T>::SimultaneousExponentiate(T *results, const T &base,
+void AbstractRing::SimultaneousExponentiate(Integer *results,
+ const Integer &base,
const Integer *exponents, unsigned int expCount) const
{
- MultiplicativeGroup().AbstractGroup<T>::SimultaneousMultiply(results, base,
+ MultiplicativeGroup().AbstractGroup::SimultaneousMultiply(results, base,
exponents, expCount);
}
+
} // namespace
+
+#ifdef __GNUC__
+namespace mySTL {
+template TaoCrypt::WindowSlider* uninit_copy<TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*>(TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*);
+template vector<TaoCrypt::Integer>* uninit_fill_n<vector<TaoCrypt::Integer>*, unsigned int, vector<TaoCrypt::Integer> >(vector<TaoCrypt::Integer>*, unsigned int, vector<TaoCrypt::Integer> const&);
+template void destroy<TaoCrypt::WindowSlider*>(TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*);
+template void destroy<vector<TaoCrypt::Integer>*>(vector<TaoCrypt::Integer>*, vector<TaoCrypt::Integer>*);
+}
+#endif
--- 1.1/extra/yassl/taocrypt/src/asn.cpp 2005-04-28 18:23:18 +05:00
+++ 1.2/extra/yassl/taocrypt/src/asn.cpp 2005-05-25 00:15:01 +05:00
@@ -187,7 +187,7 @@
void PublicKey::SetSize(word32 s)
{
sz_ = s;
- key_ = new (tc) byte[sz_];
+ key_ = new byte[sz_];
}
@@ -199,7 +199,7 @@
void PublicKey::AddToEnd(const byte* data, word32 len)
{
- mySTL::auto_ptr<byte> tmp(new (tc) byte[sz_ + len]);
+ mySTL::auto_ptr<byte> tmp(new byte[sz_ + len]);
memcpy(tmp.get(), key_, sz_);
memcpy(tmp.get() + sz_, data, len);
@@ -218,7 +218,7 @@
{
if (n) {
int sz = strlen(n);
- name_ = new (tc) char[sz + 1];
+ name_ = new char[sz + 1];
memcpy(name_, n, sz);
name_[sz] = 0;
}
@@ -480,7 +480,7 @@
}
else
if (!ValidateSignature(signers))
- source_.SetError(SIG_CONFIRM_E);
+ source_.SetError(SIG_OTHER_E);
}
@@ -632,7 +632,7 @@
}
sigLength_--;
- signature_ = new (tc) byte[sigLength_];
+ signature_ = new byte[sigLength_];
memcpy(signature_, source_.get_current(), sigLength_);
source_.advance(sigLength_);
@@ -653,7 +653,7 @@
sigLength_ = GetLength(source_);
- signature_ = new (tc) byte[sigLength_];
+ signature_ = new byte[sigLength_];
memcpy(signature_, source_.get_current(), sigLength_);
source_.advance(sigLength_);
@@ -693,7 +693,7 @@
if (id == COMMON_NAME) {
char*& ptr = (nt == ISSUER) ? issuer_ : subject_;
- ptr = new (tc) char[strLen + 1];
+ ptr = new char[strLen + 1];
memcpy(ptr, source_.get_current(), strLen);
ptr[strLen] = 0;
}
@@ -810,15 +810,15 @@
mySTL::auto_ptr<HASH> hasher;
if (signatureOID_ == MD5wRSA) {
- hasher.reset(new (tc) MD5);
+ hasher.reset(new MD5);
ht = MD5h;
}
else if (signatureOID_ == MD2wRSA) {
- hasher.reset(new (tc) MD2);
+ hasher.reset(new MD2);
ht = MD2h;
}
else if (signatureOID_ == SHAwRSA || signatureOID_ == SHAwDSA) {
- hasher.reset(new (tc) SHA);
+ hasher.reset(new SHA);
ht = SHAh;
}
else {
--- 1.2/extra/yassl/taocrypt/src/dh.cpp 2005-05-20 19:32:42 +05:00
+++ 1.3/extra/yassl/taocrypt/src/dh.cpp 2005-05-25 00:15:01 +05:00
@@ -26,7 +26,6 @@
#include "runtime.hpp"
#include "dh.hpp"
#include "asn.hpp"
-#include <math.h>
namespace TaoCrypt {
--- 1.1/extra/yassl/taocrypt/src/dsa.cpp 2005-04-28 18:23:19 +05:00
+++ 1.2/extra/yassl/taocrypt/src/dsa.cpp 2005-05-25 00:15:01 +05:00
@@ -27,8 +27,6 @@
#include "modarith.hpp"
#include "stdexcept.hpp"
-#include "algebra.cpp" // for GCC 3.2 on aix ?
-
namespace TaoCrypt {
--- 1.4/extra/yassl/taocrypt/src/integer.cpp 2005-05-06 20:54:27 +05:00
+++ 1.5/extra/yassl/taocrypt/src/integer.cpp 2005-05-25 00:15:01 +05:00
@@ -38,11 +38,10 @@
#include "asn.hpp"
#include "stdexcept.hpp"
-#include "algebra.cpp"
#ifdef __DECCXX
- #include <c_asm.h> // for asm multiply overflow
+ #include <c_asm.h> // for asm overflow assembly
#endif
@@ -63,7 +62,7 @@
#pragma message("You do not seem to have the Visual C++ Processor Pack ")
#pragma message("installed, so use of SSE2 intrinsics will be disabled.")
#elif defined(__GNUC__) && defined(__i386__)
-/* #warning You do not have GCC 3.3 or later, or did not specify the -msse2 \
+/* #warning You do not have GCC 3.3 or later, or did not specify the -msse2 \
compiler option. Use of SSE2 intrinsics will be disabled.
*/
#endif
@@ -109,7 +108,7 @@
assert(IsAlignedOn(p, 16));
return (T*)p;
}
- return new (tc) T[n];
+ return new T[n];
}
@@ -178,7 +177,7 @@
#elif defined(__DECCXX)
r.halfs_.high = asm("umulh %a0, %a1, %v0", a, b);
#else
- #error unsupported alpha compiler for asm multiply overflow
+ #error can not implement multiply overflow
#endif
#elif defined(__ia64__)
r.halfs_.low = a*b;
@@ -392,6 +391,7 @@
return Q;
}
+
// do a 4 word by 2 word divide, returns 2 word quotient in Q0 and Q1
template <class S, class D>
inline D DivideFourWordsByTwo(S *T, const D &Al, const D &Ah, const D &B)
@@ -470,66 +470,6 @@
}
-template <class T>
-static Integer StringToInteger(const T *str)
-{
- word radix;
-
- unsigned int length;
- for (length = 0; str[length] != 0; length++) {}
-
- Integer v;
-
- if (length == 0)
- return v;
-
- switch (str[length-1])
- {
- case 'h':
- case 'H':
- radix=16;
- break;
- case 'o':
- case 'O':
- radix=8;
- break;
- case 'b':
- case 'B':
- radix=2;
- break;
- default:
- radix=10;
- }
-
- if (length > 2 && str[0] == '0' && str[1] == 'x')
- radix = 16;
-
- for (unsigned i=0; i<length; i++)
- {
- word digit;
-
- if (str[i] >= '0' && str[i] <= '9')
- digit = str[i] - '0';
- else if (str[i] >= 'A' && str[i] <= 'F')
- digit = str[i] - 'A' + 10;
- else if (str[i] >= 'a' && str[i] <= 'f')
- digit = str[i] - 'a' + 10;
- else
- digit = radix;
-
- if (digit < radix)
- {
- v *= radix;
- v += digit;
- }
- }
-
- if (str[0] == '-')
- v.Negate();
-
- return v;
-}
-
static int Compare(const word *A, const word *B, unsigned int N)
{
while (N--)
@@ -2308,85 +2248,6 @@
}
}
-/*
-template <class P>
-void RecursiveMultiplyTop(word *R, word *T, const word *L, const word *A,
- const word *B, unsigned int N, const P *dummy=0)
-{
- assert(N>=2 && N%2==0);
-
- if (N==4)
- {
- P::Multiply4(T, A, B);
- ((dword *)R)[0] = ((dword *)T)[2];
- ((dword *)R)[1] = ((dword *)T)[3];
- }
- else if (N==2)
- {
- P::Multiply2(T, A, B);
- ((dword *)R)[0] = ((dword *)T)[1];
- }
- else
- {
- const unsigned int N2 = N/2;
- int carry;
-
- int aComp = Compare(A0, A1, N2);
- int bComp = Compare(B0, B1, N2);
-
- switch (2*aComp + aComp + bComp)
- {
- case -4:
- P::Subtract(R0, A1, A0, N2);
- P::Subtract(R1, B0, B1, N2);
- RecursiveMultiply<P>(T0, T2, R0, R1, N2);
- P::Subtract(T1, T1, R0, N2);
- carry = -1;
- break;
- case -2:
- P::Subtract(R0, A1, A0, N2);
- P::Subtract(R1, B0, B1, N2);
- RecursiveMultiply<P>(T0, T2, R0, R1, N2);
- carry = 0;
- break;
- case 2:
- P::Subtract(R0, A0, A1, N2);
- P::Subtract(R1, B1, B0, N2);
- RecursiveMultiply<P>(T0, T2, R0, R1, N2);
- carry = 0;
- break;
- case 4:
- P::Subtract(R0, A1, A0, N2);
- P::Subtract(R1, B0, B1, N2);
- RecursiveMultiply<P>(T0, T2, R0, R1, N2);
- P::Subtract(T1, T1, R1, N2);
- carry = -1;
- break;
- default:
- SetWords(T0, 0, N);
- carry = 0;
- }
-
- RecursiveMultiply<P>(T2, R0, A1, B1, N2);
-
- // now T[01] holds (A1-A0)*(B0-B1), T[23] holds A1*B1
-
- word c2 = P::Subtract(R0, L+N2, L, N2);
- c2 += P::Subtract(R0, R0, T0, N2);
- word t = (Compare(R0, T2, N2) == -1);
-
- carry += t;
- carry += Increment(R0, N2, c2+t);
- carry += P::Add(R0, R0, T1, N2);
- carry += P::Add(R0, R0, T3, N2);
- assert (carry >= 0 && carry <= 2);
-
- CopyWords(R1, T3, N2);
- Increment(R1, N2, carry);
- }
-}
-*/
-
void RecursiveMultiplyTop(word *R, word *T, const word *L, const word *A,
const word *B, unsigned int N)
@@ -2739,20 +2600,6 @@
}
-Integer::Integer(const char *str)
- : reg_(2), sign_(POSITIVE)
-{
- *this = StringToInteger(str);
-}
-
-
-Integer::Integer(const wchar_t *str)
- : reg_(2), sign_(POSITIVE)
-{
- *this = StringToInteger(str);
-}
-
-
Integer::Integer(const byte *encodedInteger, unsigned int byteCount,
Signedness s)
{
@@ -3358,76 +3205,6 @@
#undef R2
#undef R3
-/*
-// do a 3 word by 2 word divide, returns quotient and leaves remainder in A
-static word SubatomicDivide(word *A, word B0, word B1)
-{
- // assert {A[2],A[1]} < {B1,B0}, so quotient can fit in a word
- assert(A[2] < B1 || (A[2]==B1 && A[1] < B0));
-
- dword p, u;
- word Q;
-
- // estimate the quotient: do a 2 word by 1 word divide
- if (B1+1 == 0)
- Q = A[2];
- else
- Q = word(MAKE_DWORD(A[1], A[2]) / (B1+1));
-
- // now subtract Q*B from A
- p = (dword) B0*Q;
- u = (dword) A[0] - LOW_WORD(p);
- A[0] = LOW_WORD(u);
- u = (dword) A[1] - HIGH_WORD(p) - (word)(0-HIGH_WORD(u)) - (dword)B1*Q;
- A[1] = LOW_WORD(u);
- A[2] += HIGH_WORD(u);
-
- // Q <= actual quotient, so fix it
- while (A[2] || A[1] > B1 || (A[1]==B1 && A[0]>=B0))
- {
- u = (dword) A[0] - B0;
- A[0] = LOW_WORD(u);
- u = (dword) A[1] - B1 - (word)(0-HIGH_WORD(u));
- A[1] = LOW_WORD(u);
- A[2] += HIGH_WORD(u);
- Q++;
- assert(Q); // shouldn't overflow
- }
-
- return Q;
-}
-*/
-
-
-/*
-// do a 4 word by 2 word divide, returns 2 word quotient in Q0 and Q1
-static inline void AtomicDivide(word *Q, const word *A, const word *B)
-{
- if (!B[0] && !B[1]) // if divisor is 0, we assume divisor==2**(2*WORD_BITS)
- {
- Q[0] = A[2];
- Q[1] = A[3];
- }
- else
- {
- word T[4];
- T[0] = A[0]; T[1] = A[1]; T[2] = A[2]; T[3] = A[3];
- Q[1] = SubatomicDivide(T+1, B[0], B[1]);
- Q[0] = SubatomicDivide(T, B[0], B[1]);
-
-#ifndef NDEBUG
- // multiply quotient and divisor and add remainder
- // make sure it equals dividend
- assert(!T[2] && !T[3] && (T[1] < B[1] || (T[1]==B[1] && T[0]<B[0])));
- word P[4];
- LowLevel::Multiply2(P, Q, B);
- Add(P, P, T, 4);
- assert(memcmp(P, A, 4*WORD_SIZE)==0);
-#endif
- }
-}
-*/
-
static inline void AtomicDivide(word *Q, const word *A, const word *B)
{
@@ -3772,7 +3549,7 @@
Integer Integer::Gcd(const Integer &a, const Integer &b)
{
- return EuclideanDomainOf<Integer>().Gcd(a, b);
+ return EuclideanDomainOf().Gcd(a, b);
}
Integer Integer::InverseMod(const Integer &m) const
@@ -3955,7 +3732,7 @@
dr.ConvertIn(y), e2));
}
else
- return AbstractRing<Integer>::CascadeExponentiate(x, e1, y, e2);
+ return AbstractRing::CascadeExponentiate(x, e1, y, e2);
}
void ModularArithmetic::SimultaneousExponentiate(Integer *results,
@@ -3971,7 +3748,7 @@
results[i] = dr.ConvertOut(results[i]);
}
else
- AbstractRing<Integer>::SimultaneousExponentiate(results, base,
+ AbstractRing::SimultaneousExponentiate(results, base,
exponents, exponentsCount);
}
@@ -4170,10 +3947,6 @@
}
#ifdef __GNUC__
-template Integer StringToInteger<char>(char const*);
-template Integer StringToInteger<wchar_t>(wchar_t const*);
-template class EuclideanDomainOf<Integer>;
-template class AbstractEuclideanDomain<Integer>;
template unsigned int DivideThreeWordsByTwo<unsigned int, DWord>(unsigned int*, unsigned int, unsigned int, DWord*);
#endif
--- 1.1/extra/yassl/taocrypt/src/misc.cpp 2005-04-28 18:23:20 +05:00
+++ 1.2/extra/yassl/taocrypt/src/misc.cpp 2005-05-25 00:15:01 +05:00
@@ -27,34 +27,7 @@
#include <new> // for NewHandler
-void* operator new(size_t sz, TaoCrypt::new_t)
-{
- void* ptr = ::operator new(sz);
-
- if (!ptr) abort();
-
- return ptr;
-}
-
-void* operator new[](size_t sz, TaoCrypt::new_t tc)
-{
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
- void* ptr = ::operator new(sz); // no ::operator new[]
-#else
- void* ptr = ::operator new[](sz);
-#endif
-
- if (!ptr) abort();
-
- return ptr;
-}
-
-
-
namespace TaoCrypt {
-
-
-new_t tc; // for library new
inline void XorWords(word* r, const word* a, unsigned int n)
--- 1.1/extra/yassl/taocrypt/src/random.cpp 2005-04-28 18:23:21 +05:00
+++ 1.2/extra/yassl/taocrypt/src/random.cpp 2005-05-25 00:15:01 +05:00
@@ -26,7 +26,6 @@
#include "runtime.hpp"
#include "random.hpp"
-#include "stdexcept.hpp"
#if defined(WIN32)
#define _WIN32_WINNT 0x0400
--- 1.3/extra/yassl/taocrypt/src/rsa.cpp 2005-05-05 19:19:22 +05:00
+++ 1.4/extra/yassl/taocrypt/src/rsa.cpp 2005-05-25 00:15:01 +05:00
@@ -27,7 +27,6 @@
#include "modarith.hpp"
#include "stdexcept.hpp"
-#include "algebra.cpp" // for GCC 3.2 on aix ?
namespace TaoCrypt {
@@ -214,8 +213,6 @@
#ifdef __GNUC__
template AllocatorWithCleanup<unsigned char>::pointer StdReallocate<unsigned char, AllocatorWithCleanup<unsigned char> >(AllocatorWithCleanup<unsigned char>&, unsigned char*, AllocatorWithCleanup<unsigned char>::size_type, AllocatorWithCleanup<unsigned char>::size_type, bool);
template AllocatorWithCleanup<unsigned int>::pointer StdReallocate<unsigned int, AllocatorWithCleanup<unsigned int> >(AllocatorWithCleanup<unsigned int>&, unsigned int*, AllocatorWithCleanup<unsigned int>::size_type, AllocatorWithCleanup<unsigned int>::size_type, bool);
-template class AbstractGroup<Integer>;
-template class AbstractRing<Integer>;
template class RSA_Decryptor<RSA_BlockType2>;
template class RSA_Encryptor<RSA_BlockType1>;
template class RSA_Encryptor<RSA_BlockType2>;
@@ -227,11 +224,7 @@
namespace mySTL {
template TaoCrypt::Integer* uninit_copy<TaoCrypt::Integer*, TaoCrypt::Integer*>(TaoCrypt::Integer*, TaoCrypt::Integer*, TaoCrypt::Integer*);
template TaoCrypt::Integer* uninit_fill_n<TaoCrypt::Integer*, unsigned int, TaoCrypt::Integer>(TaoCrypt::Integer*, unsigned int, TaoCrypt::Integer const&);
-template TaoCrypt::WindowSlider* uninit_copy<TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*>(TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*);
-template vector<TaoCrypt::Integer>* uninit_fill_n<vector<TaoCrypt::Integer>*, unsigned int, vector<TaoCrypt::Integer> >(vector<TaoCrypt::Integer>*, unsigned int, vector<TaoCrypt::Integer> const&);
template void destroy<TaoCrypt::Integer*>(TaoCrypt::Integer*, TaoCrypt::Integer*);
-template void destroy<TaoCrypt::WindowSlider*>(TaoCrypt::WindowSlider*, TaoCrypt::WindowSlider*);
-template void destroy<vector<TaoCrypt::Integer>*>(vector<TaoCrypt::Integer>*, vector<TaoCrypt::Integer>*);
}
#endif
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 14
- Very large temporary file(s)I'm running MySQL 4.1.22-standard Community on CentOS. My problem is a query
that is using about 800mb for what I assume is a temporary sort file, and
I'm hoping that I can do something about it.
The purpose of this query is to populate an unnormalized table with data
from several other tables. I do this to make it easier for MS Access users
to use simple filters to see subsets of the data without having to construct
queries that have to be done as pass-through SQL.
This post is going to be long, so that you can see exactly what is going on.
I don't want to leave anything out that might be critical. Sorry...
Here are the tables involved:
Table: customers
Create Table: CREATE TABLE `customers` (
`customer_id` int(11) NOT NULL auto_increment,
`priority` int(3) NOT NULL default '0',
`account_id` int(2) NOT NULL default '0',
`sal` varchar(50) NOT NULL default '',
`first_name` varchar(125) NOT NULL default '',
`last_name` varchar(125) NOT NULL default '',
`company` varchar(255) NOT NULL default '',
`dept` varchar(255) NOT NULL default '',
`position` varchar(255) NOT NULL default '',
`address_1` varchar(255) NOT NULL default '',
`address_2` varchar(255) NOT NULL default '',
`address_3` varchar(255) NOT NULL default '',
`zip` varchar(15) NOT NULL default '',
`country` varchar(50) NOT NULL default '',
`phone` varchar(255) NOT NULL default '',
`fax` varchar(50) NOT NULL default '',
`email` varchar(255) NOT NULL default '',
`entry_date` datetime default NULL,
`follow_up` date default NULL,
`action` varchar(50) NOT NULL default '',
`stage_id` int(11) default '0',
`status` varchar(50) NOT NULL default '',
`exp_price` decimal(8,2) default '0.00',
`input_source` varchar(255) NOT NULL default '',
`input_date` date default NULL,
`interest_category` varchar(255) NOT NULL default '',
`interest_subcategory` varchar(255) NOT NULL default '',
`interest_keyword` varchar(255) NOT NULL default '',
`db_entry` tinyint(3) NOT NULL default,
`hidden` tinyint(1) NOT NULL default '0',
`email_status` set('Y','N') NOT NULL default 'Y',
`dm_status` set('Y','N') NOT NULL default 'Y',
`num_products_purchased` smallint(6) default NULL,
`key_account` set('Y','N') NOT NULL default 'N',
`phone2` varchar(255) NOT NULL default '',
PRIMARY KEY (`customer_id`),
KEY `account_id` (`account_id`),
KEY `priority_id` (`priority`),
KEY `stage_id` (`stage_id`),
KEY `email` (`email`),
KEY `last_name_index` (`last_name`)
) ENGINE=MyISAM AUTO_INCREMENT=73717 DEFAULT CHARSET=utf8
***********************************************
Table: stage
Create Table: CREATE TABLE `stage` (
`stage_id` int(11) NOT NULL auto_increment,
`stage_name` varchar(15) default NULL,
PRIMARY KEY (`stage_id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8
******************************************************
Table: cust_topics
Create Table: CREATE TABLE `cust_topics` (
`cust_topic_id` int(11) NOT NULL auto_increment,
`topic_code` varchar(15) NOT NULL default '',
`customer_id` int(11) NOT NULL default '0',
PRIMARY KEY (`cust_topic_id`),
KEY `topic_id` (`customer_id`),
KEY `topic_code` (`topic_code`)
) ENGINE=MyISAM AUTO_INCREMENT=143201 DEFAULT CHARSET=utf8
******************************************************
Table: account
Create Table: CREATE TABLE `account` (
`account_id` int(11) NOT NULL auto_increment,
`account_name` char(2) character set latin1 default NULL,
`real_name` varchar(30) NOT NULL default '' COMMENT 'Real name associated
with account',
PRIMARY KEY (`account_id`),
UNIQUE KEY `account_name` (`account_name`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8
******************************************************
Table: consolidated_customer_data
Create Table: CREATE TABLE `consolidated_customer_data` (
`customer_id` int(11) NOT NULL default '0',
`acct_name` varchar(6) default NULL,
`email` varchar(60) default NULL,
`email_status` set('Y','N') NOT NULL default 'Y',
`dm_status` set('Y','N') NOT NULL default '',
`status` varchar(50) NOT NULL default '""',
`last_name` varchar(125) default NULL,
`first_name` varchar(125) default NULL,
`sal` varchar(50) default NULL,
`company` varchar(255) default NULL,
`address_1` varchar(255) default NULL,
`address_2` varchar(255) default NULL,
`address_3` varchar(255) default NULL,
`country` varchar(50) default NULL,
`zip` varchar(15) default NULL,
`input_source` varchar(255) default NULL,
`interest_category` varchar(255) NOT NULL default '""',
`interest_subcategory` varchar(255) NOT NULL default '""',
`topic_list` text,
`stage` varchar(255) NOT NULL default '""',
PRIMARY KEY (`customer_id`),
KEY `acct_name` (`acct_name`),
KEY `email` (`email`),
KEY `last_name` (`last_name`),
KEY `company` (`company`),
KEY `country` (`country`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
***********************
Before putting the data into the table `consolidated_customer_data`, I
TRUNCATE it. Then I use INSERT INTO consolidated_customer_data SELECT to
populate the table. I also use
SET SESSION group_concat_max_len = 10000;
Because the length of the topic_list can get quite large.
Now, here's an EXPLAIN of the SELECT query:
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: stage
type: ALL
possible_keys: PRIMARY
key: NULL
key_len: NULL
ref: NULL
rows: 9
Extra: Using temporary; Using filesort
*************************** 2. row ***************************
id: 1
select_type: SIMPLE
table: customers
type: ref
possible_keys: account_id,stage_id
key: stage_id
key_len: 5
ref: giiexpr_customers.stage.stage_id
rows: 4535
Extra: Using where
*************************** 3. row ***************************
id: 1
select_type: SIMPLE
table: account
type: eq_ref
possible_keys: PRIMARY
key: PRIMARY
key_len: 4
ref: giiexpr_customers.customers.account_id
rows: 1
Extra:
*************************** 4. row ***************************
id: 1
select_type: SIMPLE
table: cust_topics
type: ref
possible_keys: topic_id
key: topic_id
key_len: 4
ref: giiexpr_customers.customers.customer_id
rows: 4
Extra:
=================
Here are the number of rows in each table:
Rows in stage: 9
Rows in customers: 46764
Rows in account: 14
Rows in cust_topics: 94994
Not surprisingly, the largest tables (in terms of disk space) are customers,
followed consolidated_customer_data:
22K customers.frm
8.1M customers.MYD
4.7M customers.MYI
18K consolidated_customer_data.frm
6.3M consolidated_customer_data.MYD
3.3M consolidated_customer_data.MYI
So, after all of that, why am I using 800+ megabytes in my /tmp?
Regards,
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com
- 15
- bk commit into 4.1 tree (jimw:1.2220)Below is the list of changes that have just been committed into a local
4.1 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://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2220 05/04/29 08:46:03 email***@***.com +2 -0
Manually resolve merge
mysql-test/t/query_cache.test
1.41 05/04/29 08:46:00 email***@***.com +0 -0
Resolve merge
mysql-test/r/query_cache.result
1.54 05/04/29 08:46:00 email***@***.com +0 -0
Resolve merge
# 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-4.1-clean/RESYNC
--- 1.53/mysql-test/r/query_cache.result 2005-03-31 19:17:42 -08:00
+++ 1.54/mysql-test/r/query_cache.result 2005-04-29 08:46:00 -07:00
@@ -299,6 +299,8 @@
UNIX_TIMESTAMP()
select USER() from t1;
USER()
+select CURRENT_USER() from t1;
+CURRENT_USER()
select benchmark(1,1) from t1;
benchmark(1,1)
explain extended select benchmark(1,1) from t1;
--- 1.40/mysql-test/t/query_cache.test 2005-03-31 19:17:42 -08:00
+++ 1.41/mysql-test/t/query_cache.test 2005-04-29 08:46:00 -07:00
@@ -184,6 +184,7 @@
select RAND() from t1;
select UNIX_TIMESTAMP() from t1;
select USER() from t1;
+select CURRENT_USER() from t1;
select benchmark(1,1) from t1;
explain extended select benchmark(1,1) from t1;
show status like "Qcache_queries_in_cache";
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
|
|
|