Commit graph

1623 commits

Author SHA1 Message Date
monty@mysql.com/nosik.monty.fi
eeaa3adb03 Added sql_mode PAD_CHAR_TO_FULL_LENGTH (WL#921)
This pads the value of CHAR columns with spaces up to full column length (according to ANSI)
It's not makde part of oracle or ansi mode yet, as this would cause a notable behaviour change.
Added uuid_short(), a generator for increasing 'unique' longlong integers (8 bytes)
2007-04-27 01:12:09 +03:00
mats@romeo.(none)
875de0e571 Merge romeo.(none):/home/bkroot/mysql-5.1-rpl
into  romeo.(none):/home/bk/merge-mysql-5.1
2007-04-20 10:46:58 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
52196018ce Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/new/mysql-5.0-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/new/mysql-5.1-marvel
2007-04-13 10:25:33 +03:00
jani@ua141d10.elisa.omakaista.fi
335153121b Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-04-12 12:50:02 +03:00
lars/lthalmann@dl145h.mysql.com
1e5d279451 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
2007-04-10 18:26:14 +02:00
jani@ua141d10.elisa.omakaista.fi
b4ba815967 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-04-10 16:28:47 +03:00
bar@mysql.com
220c453194 Merge mysql.com:/home/bar/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.1-new-rpl
2007-04-09 18:06:27 +05:00
bar@mysql.com
4341df8cf6 Bug#22648 LC_TIME_NAMES: Setting GLOBAL has no effect
Problem: setting/displaying @@LC_TIME_NAMES didn't distinguish between
GLOBAL and SESSION variable types - always SESSION variable
was set/shonw.
Fix: set either global or session value.
Also, "mysqld --lc-time-names" was added to set "global default" value.
2007-04-09 17:58:56 +05:00
holyfoot/hf@hfmain.(none)
ce426dd622 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
2007-04-07 14:59:53 +05:00
mskold/marty@mysql.com/linux.site
3e8cf5958b Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-04-05 08:39:12 +02:00
tomas@whalegate.ndb.mysql.com
343bfb779d Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-04-04 23:03:27 +02:00
jani@ua141d10.elisa.omakaista.fi
e40d3631a3 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-04-04 21:25:39 +03:00
mskold/marty@linux.site
552d1086ec Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2007-04-04 17:03:31 +02:00
mskold/marty@mysql.com/linux.site
6c8f5c5859 Merge from 5.0 2007-04-04 16:58:25 +02:00
mskold/marty@linux.site
7e33b92279 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1
2007-04-04 13:21:49 +02:00
mskold/marty@mysql.com/linux.site
625a2629f0 Bug #26242 UPDATE with subquery and triggers failing with cluster tables
In certain cases AFTER UPDATE/DELETE triggers on NDB tables that referenced
subject table didn't see the results of operation which caused invocation
of those triggers. In other words AFTER trigger invoked as result of update
(or deletion) of particular row saw version of this row before update (or
deletion).

The problem occured because NDB handler in those cases postponed actual
update/delete operations to be able to perform them later as one batch.

This fix solves the problem by disabling this optimization for particular
operation if subject table has AFTER trigger for this operation defined.
To achieve this we introduce two new flags for handler::extra() method:
HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH.
These are called if there exists AFTER DELETE/UPDATE triggers during a
statement that potentially can generate calls to delete_row()/update_row().
This includes multi_delete/multi_update statements as well as insert statements
that do delete/update as part of an ON DUPLICATE statement.
2007-04-04 12:50:39 +02:00
holyfoot/hf@hfmain.(none)
f65b42dc6e Merge mysql.com:/home/hf/work/23675/my51-23675
into  mysql.com:/home/hf/work/my_mrg/my51-my_mrg
2007-04-04 14:04:05 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
f55ab9ef5e Bug #23675 Partitions: possible security breach via alter
now we return different error message if user doesn't have
SELECT grants
2007-04-04 14:01:47 +05:00
gluh@mysql.com/eagle.(none)
8c18c3ea0c Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
additional fix
2007-04-03 19:40:55 +05:00
jani@ua141d10.elisa.omakaista.fi
e4fde44948 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-04-03 14:51:32 +03:00
jamppa@bk-internal.mysql.com
879725900b Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-marvel
2007-04-03 13:51:31 +02:00
gluh@mysql.com/eagle.(none)
2d47f0cb1b Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte 2007-04-03 16:13:27 +05:00
anozdrin/alik@ibm.opbmk
5441aefd1d Fix for BUG#27337: Privileges are not properly restored.
The problem was that THD::db_access variable was not restored after
database switch in stored-routine-execution code.

The fix is to restore THD::db_access in this case.

Unfortunately, this fix requires additional changes,
because in prepare_schema_table(), called on the parsing stage, we checked
privileges. That was wrong according to our design, but this flaw haven't
struck so far, because it was masked. All privilege checkings must be
done on the execution stage in order to be compatible with prepared statements
and stored routines. So, this patch also contains patch for
prepare_schema_table(), which moves the checkings to the execution phase.
2007-04-03 15:11:34 +04:00
kostja@bodhi.local
93d0316f45 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime
2007-04-03 14:34:37 +04:00
jani@ua141d10.elisa.omakaista.fi
1c7beca65e Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-03-29 17:27:42 +03:00
istruewing@chilla.local
350c5da724 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  chilla.local:/home/mydev/mysql-5.1-axmrg
2007-03-28 16:57:08 +02:00
anozdrin/alik@alik.opbmk
cc83bb0784 Fix for BUG#25082: default database change on trigger
execution breaks replication.

When a stored routine is executed, we switch current
database to the database, in which the routine
has been created. When the stored routine finishes,
we switch back to the original database.

The problem was that if the original database does not
exist (anymore) after routine execution, we raised an error.

The fix is to report a warning, and switch to the NULL database.
2007-03-27 21:55:01 +04:00
kostja@bodhi.local
b42b416400 Remove unnecessary casts to uchar. The casts are stemming from
the lexer API which internally uses  unsigned char variables to
address its state map. The implementation of the lexer should be
internal to the lexer, and not influence the rest of the code.
2007-03-27 21:09:56 +04:00
kostja@bodhi.local
e56c6d2f25 Change find_type family to accept const TYPELIB*. 2007-03-27 20:27:58 +04:00
serg@sergbook.mysql.com
237ed0c3e5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
2007-03-24 17:16:53 +02:00
aelkin/elkin@andrepl.(none)
61f871e998 Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
eliminating the unnecessary option; and replacing site-dependant stuff in the test
2007-03-24 14:40:38 +02:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
ccb9d448f3 BUG#26257 New Federated Server Functionality Doesn't support differently named tables
* Modified Federated memory allocation to use MEM_ROOT
* Modified sql_servers and federated to allocate share connection
  parameters to use MEM_ROOT
* Modified Federated to allow tablename in addition to server name
* Implicit flushing of tables using altered/dropped server name
* Added tests to prove new functionality works

Contributors to this patch: Patrick Galbraith, Antony Curtis
2007-03-24 01:18:19 -07:00
monty@mysql.com/narttu.mysql.fi
1933603647 Removed not used define YY_MAGIC_BELOW
Made year 2000 handling more uniform
Removed year 2000 handling out from calc_days()
The above removes some bugs in date/datetimes with year between 0 and 200
Now we get a note when we insert a datetime value into a date column
For default values to CREATE, don't give errors for warning level NOTE
Fixed some compiler failures
Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
Removed duplicate typedef TIME and replaced it with MYSQL_TIME

Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
2007-03-23 22:08:31 +02:00
tsmith@quadxeon.mysql.com
54e7bc8daa Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
2007-03-22 01:04:39 +01:00
kent@kent-amd64.(none)
a149769b2d Merge mysql.com:/home/kent/bk/tmp/mysql-5.0-build
into  mysql.com:/home/kent/bk/tmp/mysql-5.1-build
2007-03-20 17:58:30 +01:00
kostja@bodhi.local
bdb10baec1 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime
2007-03-20 00:42:11 +03:00
joerg@trift2.
90879b5737 Merge trift2.:/MySQL/M50/clone-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-03-19 22:18:31 +01:00
serg@janus.mylan
68fd66e853 wl#3700 - post-review fixes:
s/ulonglong/key_part_map/, comments
2007-03-17 00:13:25 +01:00
joerg@trift2.
66960bd1e7 Bug#20166 mysql-test-run.pl does not test system privilege tables creation
- Build sql files for netware from the mysql_system_tables*.sq files
 - Fix comments about mysql_create_system_tables.sh
 - Use mysql_install_db.sh to create system tables for mysql_test-run-shell
 - Fix mysql-test-run.pl to also look in share/mysql for the msyql_system*.sql files

Changeset coded today by Magnus Svensson, just the application to 5.0.38 is by Joerg Bruehe.
2007-03-16 20:56:16 +01:00
serg@janus.mylan
55a548cf4d Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-03-16 20:33:27 +01:00
holyfoot/hf@hfmain.(none)
cc9fe9c3e1 Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
2007-03-16 22:09:10 +04:00
serg@janus.mylan
f813272125 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-03-16 14:09:30 +01:00
gkodinov/kgeorge@magare.gmz
830c134e84 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26261-5.0-opt
2007-03-16 10:50:33 +02:00
gkodinov/kgeorge@macbook.gmz
61d93679c3 Bug #26261:
INSERT uses query_id to verify what fields are
 mentioned in the fields list of the INSERT command.
 However the check for that is made after the 
 ON DUPLICATE KEY is processed. This causes all
 the fields mentioned in ON DUPLICATE KEY to be 
 considered as mentioned in the fields list of 
 INSERT.
 Moved the check up, right after processing the
 fields list.
2007-03-16 10:35:39 +02:00
guilhem@gbichot3.local
245668efb0 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  gbichot3.local:/home/mysql_src/mysql-5.1-runtime-735-realfix
2007-03-15 12:11:03 +01:00
guilhem@gbichot3.local
eaf7728d9f Fix for BUG#735 "Prepared Statements: there is no support for Query
Cache".
WL#1569 "Prepared Statements: implement support of Query Cache".
Prepared SELECTs did not look up in the query cache, and their results
were not stored in the query cache. This made them slower than
non-prepared SELECTs in some cases.
The fix is to re-use the expanded query (the prepared query where
"?" placeholders are replaced by their values, at execution time)
for searching/storing in the query cache.
It works fine for statements prepared via mysql_stmt_prepare(), which
are the most commonly used and were the scope of this bugfix and WL.
It works less fine for statements prepared via the SQL command
PREPARE...FROM, which are still not using the query cache if they
have at least one parameter (because then the expanded query contains
names of user variables, and user variables don't work with the
query cache, even in non-prepared queries).
Note that results from prepared SELECTs, which are in the binary
protocol, and results from normal SELECTs, which are in the text
protocol, ignore each other in the query cache, because a result in the
binary protocol should never be served to a SELECT expecting the text
protocol and vice-versa.
Note, after this patch, bug 25843 starts applying to query cache
("changing default database between PREPARE and EXECUTE of statement
breaks binlog"), we need to fix it.
2007-03-09 18:09:57 +01:00
gkodinov/kgeorge@magare.gmz
c03a483c51 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/WL3527-5.1-opt
2007-03-09 17:54:13 +02:00
kroki/tomash@moonlight.home
7bbea96754 Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1
into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1-bug9953
2007-03-09 13:17:46 +03:00
kroki/tomash@moonlight.home
c19affef54 BUG#9953: CONVERT_TZ requires mysql.time_zone_name to be locked
The problem was that some facilities (like CONVERT_TZ() function or
server HELP statement) may require implicit access to some tables in
'mysql' database.  This access was done by ordinary means of adding
such tables to the list of tables the query is going to open.
However, if we issued LOCK TABLES before that, we would get "table
was not locked" error trying to open such implicit tables.

The solution is to treat certain tables as MySQL system tables, like
we already do for mysql.proc.  Such tables may be opened for reading
at any moment regardless of any locks in effect.  The cost of this is
that system table may be locked for writing only together with other
system tables, it is disallowed to lock system tables for writing and
have any other lock on any other table.

After this patch the following tables are treated as MySQL system
tables:
  mysql.help_category
  mysql.help_keyword
  mysql.help_relation
  mysql.help_topic
  mysql.proc (it already was)
  mysql.time_zone
  mysql.time_zone_leap_second
  mysql.time_zone_name
  mysql.time_zone_transition
  mysql.time_zone_transition_type

These tables are now opened with open_system_tables_for_read() and
closed with close_system_tables(), or one table may be opened with
open_system_table_for_update() and closed with close_thread_tables()
(the latter is used for mysql.proc table, which is updated as part of
normal MySQL server operation).  These functions may be used when
some tables were opened and locked already.

NOTE: online update of time zone tables is not possible during
replication, because there's no time zone cache flush neither on LOCK
TABLES, nor on FLUSH TABLES, so the master may serve stale time zone
data from cache, while on slave updated data will be loaded from the
time zone tables.
2007-03-09 13:12:31 +03:00
holyfoot/hf@hfmain.(none)
cdcf3ec097 Merge bk@192.168.21.1:mysql-5.1
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
2007-03-08 22:04:17 +04:00