Commit graph

58 commits

Author SHA1 Message Date
gluh@mysql.com/gluh.(none)
4f553f1d5f Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-kt
2006-10-05 16:38:21 +05:00
igor@rurik.mysql.com
d957636471 Fixed bug #20108.
Any default value for a enum fields over UCS2 charsets was corrupted
when we put it into the frm file, as it had been overwritten by its
HEX representation.
To fix it now we save a copy of structure that represents the enum
type and when putting the default values we use this copy.
2006-09-20 09:46:12 -07:00
gluh@mysql.com/gluh.(none)
8f44d902bd Bug#20922 mysql removes a name of first column in a table
0xFF is internal separator for SET|ENUM names. 
If this symbol is present in SET|ENUM names then we replace it with 
','(deprecated symbol for SET|ENUM names) during frm creation
and restore to 0xFF during frm opening
2006-09-11 14:50:46 +05:00
monty@mysql.com
e59360ac86 Review of new code:
Change argument order to be database, tablename for some functions
2005-07-27 13:05:30 +03:00
jimw@mysql.com
6eae678f56 Fix error message generated when trying to create a table in a
non-existent database. (Bug #10407)
2005-07-21 20:08:54 -07:00
serg@serg.mylan
8044488d7c merged 2005-05-18 22:14:08 +02:00
monty@mysql.com
763250e7db Fixed compiler failure 2005-05-14 17:08:43 +03:00
monty@mysql.com
b4e92e6360 Merge with 4.0 2005-05-14 00:01:40 +03:00
monty@mysql.com
20f969b256 Change create_field->offset to store offset from start of fields, independent of null bits.
Count null_bits separately from field offsets and adjust them in case of primary key parts.
(Previously a CREATE TABLE with a lot of null fields that was part of a primary key caused MySQL to wrongly count the number of bytes needed to store null bits)
This is a more complete bug fix for #6236
2005-05-13 11:11:50 +03:00
bar@mysql.com
57ec14d939 Bug#7302: UCS2 data in ENUM field get truncated when new column is added 2004-12-21 17:12:27 +04:00
bar@mysql.com
248a968581 UCS2 support in ENUM and SET, which also fixes:
Bug #5174 SHOW CREATE TABLE hangs up if the table contains half-with katakana enum values
UCS2 values are stored in HEX encoding in FRM file
2004-12-06 20:45:32 +04:00
ingo@mysql.com
fd1fad4371 Fixed a copy-and-paste error: mysql_create_frm() should have
its own enter string.
2004-07-29 10:33:33 +02:00
serg@serg.mylan
c03addab79 merged 2004-06-23 12:36:07 +02:00
dlenev@brandersnatch.localdomain
09ba29e539 WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
  
WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
function".
  
Fixed problems described in Bug #2336 (Different number of warnings 
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated 
at Field object level not in conversion functions).
  
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.
2004-06-18 10:11:31 +04:00
serg@sergbook.mysql.com
47482dc40d minor cleanup 2004-06-16 12:51:59 +03:00
monty@mysql.com
32d0b69503 Allow one to send empty strings with mysql_stmt_send_long_data()
mysql_stmt_reset() now resets param->long_data_used
Abort if --defaults-file=path-name uses a non-existing file (Bug #3413)
Fixed problem with symlink test (bug in 4.1.2)
2004-04-28 20:19:50 +03:00
monty@mysql.com
62fa4013ce Don't enable HA_EXTRA_WRITE_CACHE if too few rows
Revert main parts of patch for online index builds. Should be done differently
Added support for %lx in my_snprintf()
2004-04-08 17:56:45 +03:00
ingo@mysql.com
4de7e18b81 Hand-resolved auto merge 2004-04-07 14:56:24 +02:00
dlenev@jabberwock.localdomain
f6bff2e6c6 WL#1266 "Separate auto-set logic from TIMESTAMP type."
Final version of patch.

Adds support for specifying of DEFAULT NOW() and/or ON UPDATE NOW()
clauses for TIMESTAMP field definition.
Current implementation allows only one such field per table and
uses several unireg types for storing info about this properties of
field. It should be replaced with better implementation when new
.frm format is introduced.
2004-04-02 10:12:53 +04:00
ingo@mysql.com
85ec87a094 Worklog#1563 - Support of on-line CREATE/DROP INDEX.
This is to enable table handlers to implement online create/drop index.
It consists of some parts:
- New default handler methods in handler.h
- Split of mysql_alter_table. It decides if only one kind of
  alteration is to be done (e.g. only create indexes or only drop
  indexes etc.) It then calls the specialized new handler method if
  the handler implements it. Otherwise it calls real_alter_table.
- The parser sets flags for each alter operation detected in a
  command. These are used by mysql_alter_table for the decision.
- mysql_prepare_table is pulled out of mysql_create_table. This is
  also used by mysql_create_index to prepare the key structure array
  for the handler. It is also used by mysql_create_index and
  mysql_drop_index to prepare a call to mysql_create_frm.
- mysql_create_frm is pulled out of rea_create_table for use by
  mysql_create_index and mysql_drop_index after the index is
  created/dropped.
Thanks to Antony who supplied most of the changes.
2004-03-30 19:22:14 +02:00
monty@mashka.mysql.fi
494e43c1f5 merge with 4.0 to get security fixes and latest bug fixes 2004-02-20 17:43:02 +02:00
monty@mysql.com
d1e4ede7bf crease number of open files to 2048 on windows
Don't do fsync on temporary .frm files
2004-02-19 19:36:53 +02:00
monty@mysql.com
ce14578909 Merge with 4.0.18 2004-02-11 00:06:46 +01:00
jani@ua141d10.elisa.omakaista.fi
a3dc5449e9 Added new option --sync-frm / --skip-sync-frm
Marked --bdb-no-sync as deprecated
Added --sync-bdb-logs / --disable-sync-bdb-logs as a synonym / alternative.
2004-02-03 18:10:45 +00:00
hf@deer.(none)
6dcda5153b SCRUM:
WL#1163 (Making spatial code optional)
Pack of changes to do in sql/ code.
2004-01-15 21:06:22 +04:00
monty@narttu.mysql.fi
f763d4c31d Removed some warnings reported by valgrind
After merge fixes.
Now code compiles, but there is still some valgrind warnings that needs to be fixed
2003-11-04 14:09:03 +02:00
monty@narttu.mysql.fi
4e4725377d Merge with 4.0 2003-11-04 09:40:36 +02:00
monty@mysql.com
4668b54837 Call my_sync() after all data is written to .frm file
Added my_sync() to mysys which will do fsync/fdatasync/_commit() on a file.
2003-11-02 15:55:02 +02:00
serg@serg.mylan
9c4049ad12 Bitmap post-review fixes 2003-10-30 19:17:57 +01:00
serg@serg.mylan
58e9369511 >255 keys support in frm 2003-10-21 00:13:17 +02:00
serg@serg.mylan
630eb4aec7 set table->charset to default for 3.22 .frm files (bug #1161) 2003-09-28 18:47:22 +02:00
monty@mashka.mysql.fi
dbebed97e4 Remove FORCE_INIT_OF_VARS when compiling for valgrind/purify to spot wrong LINT_INIT() options
Fixed bug in ALTER TABLE ... MODIFY integer-column
Added ref_or_null optimization (needed for subqueries)
2003-06-30 13:23:54 +03:00
bar@bar.mysql.r18.ru
0989db3e90 More OpenGIS compatibility:
Point, MultiLine, Poligom, etc, are now not aliases
for Geometry, but separate field types.
2003-03-27 13:09:09 +04:00
bar@bar.mysql.r18.ru
391b3ec636 item_func.cc, item_cmpfunc.cc, unireg.cc, table.cc, sql_base.cc:
some default_charset_info were removed
2003-03-07 13:39:53 +04:00
monty@mashka.mysql.fi
25de9c19b2 After merge fixes & remove compiler warnings
Added lengths for all MYSQL_FIELD string parameters
Changed field length to 2 byte in .frm files
2003-02-07 15:47:24 +02:00
monty@mashka.mysql.fi
859b688476 Merge with 4.0.6 2002-12-05 19:38:42 +02:00
monty@hundin.mysql.fi
8830eb4aa9 Change of internal key_field=NULL handling to avoid error messages.
Optimized SELECT DISTINCT ... ORDER BY ... LIMIT
Fixed reference to uninitalized variable
2002-12-03 13:08:25 +02:00
monty@hundin.mysql.fi
65badfff1a Put temporary files in binlog cache when using BEGIN/COMMIT
Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions
New variables @@rand_seed1 and @@rand_seed2 (used by replication)
DROP TEMPORARY TABLE
2002-11-07 04:02:37 +02:00
bar@bar.mysql.r18.ru
95aef91521 BINARY charset is now used instead of binary_flag 2002-10-25 13:58:32 +05:00
monty@mashka.mysql.fi
d69250a969 Fixes and code cleanups after merge with 4.0.3
Warning handling and initial prepared statement handling (last not complete yet)
Changed a lot of functions that returned 0/1 to my_bool type.
GRANT handling now uses read/write locks instead of mutex
Change basic net functions to use THD instead of NET
(needed for 4.1 protocol)
Use my_sprintf instead of sprintf() + strlen()
Added alloc_query() to be able to chare query initialization code with
prepared statements.
Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID()

Note that the following test fails (will be fixed ASAP):
sub_select, union, rpl_rotate_logs and rpl_mystery22
2002-10-02 13:33:08 +03:00
monty@narttu.mysql.fi
7134ffec21 Merge with 4.0.3
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)
2002-08-30 12:40:40 +03:00
Sinisa@sinisa.nasamreza.org
22bcce253e Adding a necessary functionality to ::store and ::save_in_field
that will take place properly after pull from 4.0, in order to 
handle conversions from quoted constants to bigint's.
2002-08-24 14:49:04 +03:00
bar@gw.udmsearch.izhnet.ru
6f5f47855a Default table character set has been added:
CREATE TABLE a (field,...) TYPE=type CHARSET=cset;
2002-06-19 21:21:30 +05:00
monty@mashka.mysql.fi
2aecdd1a91 Big code cleanup/review before 4.0.2 release.
(All commit emails since 4.0.1 checked)
This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
2002-06-11 11:20:31 +03:00
monty@hundin.mysql.fi
ee6bd84880 Changes for new binary .frm format
Fixes after last merge from 4.0.
(Code not yet complete, need anoter merge from 4.0)
2002-06-04 08:23:57 +03:00
monty@hundin.mysql.fi
6e54cc492c Extension of .frm file (not yet ready for push) 2002-06-02 21:22:20 +03:00
bar@gw.udmsearch.izhnet.ru
196aa19cf6 Now string values are created and filled with charset field
SELECT func(charset2) FROM t ORDER BY 1 works in correct charset
2002-05-17 16:29:52 +05:00
monty@tik.mysql.fi
056175a1ce Update for BTREE keys in HEAP tables
Split handler->option_flag() to handler->table_flags() and handler->index_flags()
2002-04-12 21:35:46 +03:00
monty@hundin.mysql.fi
e070e9a01f merge with 3.23.49 2002-02-14 18:58:24 +02:00
monty@hundin.mysql.fi
d0fc67f4ac Use NAMES_SEP_CHAR also for enums (Fix for supportwizard) 2002-02-13 22:01:43 +02:00