Commit graph

1195 commits

Author SHA1 Message Date
bar@bar.myoffice.izhnet.ru
c9addb760b Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b29382
into  mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl
2007-07-04 16:41:06 +05:00
bar@mysql.com/bar.myoffice.izhnet.ru
7bf20145e0 Bug#29382 Collation 'utf8_test_ci' not found in tests
Problem: "mysql-test-run ctype_ldml" failed in binary
distributions because mysql-test/std_data/Index.xml
was included into distribution.
Fix: adding missing file.
2007-07-04 14:53:08 +05:00
anozdrin/alik@ibm.
9fae9ef66f Patch for the following bugs:
- BUG#11986: Stored routines and triggers can fail if the code
    has a non-ascii symbol
  - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
  - BUG#19443: INFORMATION_SCHEMA does not support charsets properly
  - BUG#21249: Character set of SP-var can be ignored
  - BUG#25212: Character set of string constant is ignored (stored routines)
  - BUG#25221: Character set of string constant is ignored (triggers)

There were a few general problems that caused these bugs:
1. Character set information of the original (definition) query for views,
   triggers, stored routines and events was lost.
2. mysqldump output query in client character set, which can be
   inappropriate to encode definition-query.
3. INFORMATION_SCHEMA used strings with mixed encodings to display object
   definition;

1. No query-definition-character set.

In order to compile query into execution code, some extra data (such as
environment variables or the database character set) is used. The problem
here was that this context was not preserved. So, on the next load it can
differ from the original one, thus the result will be different.

The context contains the following data:
  - client character set;
  - connection collation (character set and collation);
  - collation of the owner database;

The fix is to store this context and use it each time we parse (compile)
and execute the object (stored routine, trigger, ...).

2. Wrong mysqldump-output.

The original query can contain several encodings (by means of character set
introducers). The problem here was that we tried to convert original query
to the mysqldump-client character set.

Moreover, we stored queries in different character sets for different
objects (views, for one, used UTF8, triggers used original character set).

The solution is
  - to store definition queries in the original character set;
  - to change SHOW CREATE statement to output definition query in the
    binary character set (i.e. without any conversion);
  - introduce SHOW CREATE TRIGGER statement;
  - to dump special statements to switch the context to the original one
    before dumping and restore it afterwards.

Note, in order to preserve the database collation at the creation time,
additional ALTER DATABASE might be used (to temporary switch the database
collation back to the original value). In this case, ALTER DATABASE
privilege will be required. This is a backward-incompatible change.

3. INFORMATION_SCHEMA showed non-UTF8 strings

The fix is to generate UTF8-query during the parsing, store it in the object
and show it in the INFORMATION_SCHEMA.

Basically, the idea is to create a copy of the original query convert it to
UTF8. Character set introducers are removed and all text literals are
converted to UTF8.

This UTF8 query is intended to provide user-readable output. It must not be
used to recreate the object.  Specialized SHOW CREATE statements should be
used for this.

The reason for this limitation is the following: the original query can
contain symbols from several character sets (by means of character set
introducers).

Example:

  - original query:
    CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;

  - UTF8 query (for INFORMATION_SCHEMA):
    CREATE VIEW v1 AS SELECT 'Hello' AS c1;
2007-06-28 21:34:54 +04:00
df@pippilotta.erinye.com
6db1887a5c fix make_win_bin_dist typo 2007-06-13 19:19:11 +02:00
kent@mysql.com/kent-amd64.(none)
affeddbd8f make_win_bin_dist:
Aligned headers to include with Unix 'make install'
2007-06-12 19:49:02 +02:00
tsmith@quadxeon.mysql.com
c1c60a17dc Merge tsmith.mysql.internal:m/bk/maint/b4858/51
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
2007-05-31 00:29:02 +02:00
tsmith@quadxeon.mysql.com
91c484339c Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
2007-05-30 23:48:20 +02:00
msvensson@pilot.blaudden
7327f42060 Merge pilot.blaudden:/home/msvensson/mysql/bug28521/my51-bug28521
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-new-maint
2007-05-24 12:31:48 +02:00
df@pippilotta.erinye.com
d29eaed81a Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-24 09:22:00 +02:00
joerg@trift2.
b8e3fb1333 Merge trift2.:/MySQL/M50/bug26609-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-05-22 20:02:23 +02:00
joerg@trift2.
49dc9c5971 Merge trift2.:/MySQL/M50/bug26609-5.0
into  trift2.:/MySQL/M51/bug26609-5.1
2007-05-22 17:51:51 +02:00
joerg@trift2.
b0677f1ddc scripts/make_binary_distribution.sh :
Include all the additional test suites in the binary packages ("tar.gz").
This is the tar.gz part of the fixes for bug#26609; for RPMs it is already done.
2007-05-22 17:06:47 +02:00
tsmith@quadxeon.mysql.com
99488b31b9 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
2007-05-21 20:50:08 +02:00
msvensson@pilot.blaudden
4215eb8a50 Bug#28521 Upgrade from 5.1.17 to 5.1.18 breaks events
- Add test for upgrading from 5.1.17 - it's a beta but anyway
   good to have a check oif upgrading new system tables for 5.1
 - Always put the "originator" column after "comment" to get correct
  order of columns in "events" table
2007-05-19 18:55:38 +02:00
msvensson@pilot.blaudden
a3bd588435 Merge pilot.blaudden:/home/msvensson/mysql/bug28401/my50-bug28401
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-19 18:22:08 +02:00
msvensson@pilot.blaudden
bc69d072f3 Bug #28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE
- The SQL commands used by mysql_upgrade are written to be run
    with sql_mode set to '' - thus the scripts should change sql_mode
    for the session to make sure the SQL is legal.
2007-05-19 18:15:08 +02:00
tsmith@siva.hindu.god
30bc713c77 Merge siva.hindu.god:/home/tsmith/m/bk/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/50
2007-05-17 14:17:50 -06:00
joerg@trift2.
d84c807204 After-merge fix in "scripts/make_win_bin_dist":
Ensure the balanced use of 'x' guards in string comparisons also in the new 5.1 lines.
2007-05-16 21:00:35 +02:00
joerg@trift2.
b3f35b8be5 Manual merge. 2007-05-16 20:52:50 +02:00
joerg@trift2.
ae801bb0ae Fix bug#27833 "Bourne shell string comparison issue in scripts/make_win_bin_dist":
Several string comparisons could never yield true because they had an 'x' guard
added to the variable but not to the constant value. Fix that by guarding both sides.
2007-05-15 18:19:18 +02:00
acurtis/antony@ltamd64.xiphis.org
a4dbc0990c Merge xiphis.org:/home/antony/work2/mysql-5.1-engines
into  xiphis.org:/home/antony/work2/mysql-5.1-engines.merge
2007-05-04 23:35:14 -07:00
tsmith@siva.hindu.god
fd4774c35c Bug #4858: mysql_safe logs to syslog instead of stderr
mysqld_safe.sh: Overhaul the logging design, to allow logging
mysqld messages to syslog.  Add --syslog and --skip-syslog
arguments for mysqld_safe.
2007-05-04 19:06:36 -06:00
joerg@trift2.
5558019733 Merge trift2.:/MySQL/M50/netware-cross-5.0
into  trift2.:/MySQL/M51/netware-cross-5.1
2007-05-03 18:08:06 +02:00
joerg@trift2.
6511b280ca Better distinction between "CLEANFILES" and "DISTCLEANFILES" for some generated files
(here: "scripts/mysql_fix_privilege_tables{.sql,_sql.c}"). Important for cross-builds.
2007-05-03 15:51:02 +02:00
joerg@trift2.
16dfab5e92 Resolve a possible timing issue with "scripts/mysql_fix_privilege_tables_sql.c" in the
source tarball, this is essential for cross builds, like for NetWare.
2007-05-02 20:07:01 +02:00
iggy@recycle.(none)
f4f9480785 Minor fix. 2007-05-02 12:41:36 -04:00
joerg@trift2.
489da2252c Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2007-05-02 17:19:30 +02:00
joerg@trift2.
0db7e9c4f1 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-05-02 17:15:48 +02:00
joerg@trift2.
f486530d2d Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M51/mysql-5.1
2007-05-02 14:08:43 +02:00
joerg@trift2.
bb2996f487 Format corrections for various "Makefile.am": Leading tab, no trailing blank. 2007-05-02 14:01:49 +02:00
joerg@trift2.
331902b792 Merge trift2.:/MySQL/M50/netware-cross-5.0
into  trift2.:/MySQL/M51/netware-cross-5.1
2007-04-30 20:29:57 +02:00
joerg@trift2.
8b0f68331b Necessary change for cross-builds: Include "mysql_fix_privilege_tables_sql.c" in the source tarball. 2007-04-30 17:01:00 +02:00
serg@sergbook.mysql.com
dbd683a7d9 mysql-test/mysql-test-run.pl: another mysqld --help fix
scripts/mysql_install_db.sh: don't fail if --skip-XXX is not recognized
2007-04-30 07:45:56 -07:00
tsmith@quadxeon.mysql.com
bfb0448a4d Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
2007-04-28 01:36:09 +02:00
tsmith@quadxeon.mysql.com
33a74e41fc Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/b27653/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
2007-04-28 01:31:15 +02:00
tsmith@quadxeon.mysql.com
b90b0c7eb2 Bug #27390: mysqld_multi --config-file= not working as documented
Recognize the --no-defaults, --defaults-file and --defaults-extra-file
options.  Treat old --config-file argument as if --defaults-extra-file
had been specified instead.

Plus a few other defaults-related cleanups.
2007-04-28 01:27:54 +02:00
tsmith@quadxeon.mysql.com
119ca8702f Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
2007-04-27 00:37:18 +02:00
tsmith@quadxeon.mysql.com
70a742f817 mysql_install_db.sh: Fix algorithm for finding pkgdata directory 2007-04-27 00:35:09 +02:00
tsmith@quadxeon.mysql.com
124f9d5415 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/b27390/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
2007-04-26 23:07:33 +02:00
tsmith@quadxeon.mysql.com
4d34614389 mysql_install_db.sh:
Disable broken quoting of extra arguments; proper fix requires using eval and lots more quoting throughout the script
2007-04-25 09:16:38 +02:00
iggy@alf.
b2bf19354c Merge alf.:D:/src/mysql-5.1-maint
into  alf.:D:/src/mysql-5.1-maint_pt
2007-04-24 12:50:28 -04:00
iggy@alf.
0f43ac0d2a Minor fixes. 2007-04-24 12:41:08 -04:00
msvensson@pilot.blaudden
a4ee7302e6 Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-24 11:11:45 +02:00
msvensson@pilot.blaudden
4a1fd222ce Don't copy any subdirs in scripts/ 2007-04-23 18:16:57 +02:00
msvensson@pilot.blaudden
402d712991 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-23 14:02:09 +02:00
msvensson@pilot.blaudden
1561c39c5d Add "name of struct" as first arg to comp_sql
Fix "make distcheck"
2007-04-23 14:01:48 +02:00
msvensson@pilot.blaudden
d1de41c59a Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-04-23 12:05:00 +02:00
msvensson@pilot.blaudden
b0d923d73b Don't copy subidrs of scripts/ 2007-04-20 20:46:55 +02:00
msvensson@pilot.blaudden
9c775302de Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-19 21:31:17 +02:00
msvensson@pilot.blaudden
da93a36a0e mysql_upgrade portability fixes 2007-04-19 21:30:46 +02:00