Commit graph

1172 commits

Author SHA1 Message Date
unknown
e09b41cf57 Fix bug in BK trigger for sending changes to InnoDB devs.
BitKeeper/triggers/triggers-lib.pl:
  Fix bug in innodb_send_changes_mail() that always displayed
  details for the most recent changeset (-r+) instead of the
  $cset function argument.
2008-01-24 00:31:47 -07:00
unknown
c441c6f2f5 Merge ramayana.hindu.god:/home/tsmith/m/inno/50-triggers
into  ramayana.hindu.god:/home/tsmith/m/bk/build/50
2008-01-23 16:33:10 -07:00
unknown
14b1de4293 Add triggers to notify InnoDB developers when MySQL developers change files
that they control.


BitKeeper/triggers/post-commit.innodb.pl:
  Trigger to notify InnoDB developers about changes in InnoDB
  files.
BitKeeper/triggers/post-incoming.innodb.pl:
  Trigger to notify InnoDB developers about changes in InnoDB
  files.
BitKeeper/triggers/pre-commit.innodb.pl:
  Trigger to warn MySQL developers that they have changed InnoDB files,
  and that their changes will be sent to the InnoDB developers if they
  choose to commit.
BitKeeper/triggers/triggers-lib.pl:
  Utility functions for BK triggers written in Perl.
2008-01-23 16:18:23 -07:00
unknown
bc5bbe9a88 post-commit:
Rationalise setting $FROM.


BitKeeper/triggers/post-commit:
  Rationalise setting $FROM.
2007-12-14 15:43:54 +00:00
unknown
6b29db4fe8 post-commit:
Use $BK_USER, if set, in preference to $USER


BitKeeper/triggers/post-commit:
  Use $BK_USER, if set, in preference to $USER
2007-12-04 12:57:16 +00:00
unknown
392ade806c Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-10-25 13:28:56 +02:00
unknown
80241b44a8 add new trigger to prevent certain naming clashes
BitKeeper/triggers/pre-commit.check-case.pl:
  catch duplicate file names, ignoring capitalisation, mostly to avoid changesets where a deleted file foobar and a deleted file FooBar break a tree on case insensitive file systems
2007-10-25 13:28:12 +02:00
unknown
9273b0b25e Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build


BitKeeper/triggers/post-commit:
  Auto merged
2007-06-18 20:15:27 +02:00
unknown
496e3aa593 don't use bk cset in commit e-mails 2007-06-18 20:13:33 +02:00
unknown
6f5a616268 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build


BitKeeper/triggers/post-commit:
  Auto merged
2007-06-13 19:24:46 +02:00
unknown
4f60c51169 fix.
BitKeeper/triggers/post-commit:
  send to correct address.
2007-06-13 19:23:13 +02:00
unknown
443e2819c6 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-post-commit
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
2007-06-13 12:35:13 +02:00
unknown
43e77e6147 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-post-commit
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-post-commit


BitKeeper/triggers/post-commit:
  Remove dev-public@ / dev-bugs@ e-mail, is now handled differently. Merge fix for 5.0.
2007-06-13 11:54:28 +02:00
unknown
d87c987533 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-post-commit
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1
2007-06-13 11:48:07 +02:00
unknown
ff265ac842 BK changes for
https://inside.mysql.com/wiki/MySQL's_Code_Reviews_Published_Externally


BitKeeper/triggers/post-commit:
  1) Add additional method of detecting merge changesets.
  2) Remove code sending e-mail to dev-public@ or dev-bugs@.
  3) Change code sending e-mail to commits@ to send to dev-private@ if a specific file is present in the BK root directory, denoting this tree as private.
2007-06-13 11:44:58 +02:00
unknown
e9e6b9e477 Add triggers for detecting bad changesets to mysql-5.0 2007-05-15 17:04:31 +02:00
unknown
035062b2a7 Bug#25807: LOAD DATA INFILE does not work with Pipes
Showstopper and regression against 5.0.24.

Previously, we ignored seek() errors (see Bug#22828) and let seek()s
against pipes fail.  Now, since we check that a seek didn't fail,
and return without reading, this bug popped up.

This restores the behavior for file-ish objects that could never be 
seek()ed.


mysys/mf_iocache.c:
  If we detect early that the file is not tell()able, then we should
  assume that it's also not seek()able and therefore we should never
  set the (poorly named) "seek_not_done" flag so that we don't immedi-
  ately try to seek() when reading later.
  
  The problem was that tell() was returning -1, so when we read later, 
  we needlessly tried to seek to position  (unsigned long) -1 . 
  
  Also, if we think we're supposed to seek to a position in a file and 
  the file is un-tell()able, then abort.
2007-02-13 16:35:29 -05:00
unknown
faacf58091 Merge pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/gone:
  auto-union
mysys/my_getopt.c:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/table.cc:
  Auto merged
2007-02-13 09:56:56 +01:00
unknown
9946ed16f3 Test and bug fixes and removed unneccessary files.
mysys/my_getopt.c:
  Fixes problem with getting output lines from
  my_getopt in random places in tests.
sql/sql_prepare.cc:
  Fixes problem with failing mysql_client_test
  on some machines. This is actually a problem
  with prepared statements.
2007-02-05 17:09:44 +02:00
unknown
3d6e5feaf9 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug25341/my50-bug25341
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
2007-01-31 16:14:12 -05:00
unknown
f50bf87281 Bug#25341: "init.d/mysql stop" may timeout too quickly
Thirty five seconds is entirely too short of a period to wait for a server 
to exit.  Instead, make a valliant effort to make sure it exits, and only
give up after a very long period (arbitrarily chosen as 15 minutes).

In addition, if we're being asked to restart the server, then don't try
to start again if trying to stop the server failed.
---
Return zero by default, when the script exits.
---
Set return-/exit-value based on whether we successfully dealt with the 
PID-file.
---
Don't wait that long if the program we're waiting on exits.  It 
should only exit if the server is not going to be started.


support-files/mysql.server.sh:
  Raise timeout to a pessimistic value, 15 minutes.  We should only be willing
  to give up and exit after an extraordinary effort.
  ---
  Return zero by default, when the script exits.
  ---
  Set return-/exit-value based on whether we successfully dealt with the 
  PID-file.
  ---
  Don't wait that long if the program we're waiting on exits.  It 
  should only exit if the server is not going to be started.
2007-01-31 15:39:41 -05:00
unknown
48b8edc2ad Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-m,c-gca
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
sql/mysql_priv.h:
  Auto merged
sql/set_var.h:
  Auto merged
2007-01-26 14:47:35 -05:00
unknown
783b6eb6b6 Bug #25879: THD::options isn't set with ulonglong values and \
variables

Bits higher than 2**31 were impossible to set on THD::options.  It's
probably a remnant from a time when options was a 32-bit integer.

Now, use unsigned long-long constants and variables to set and clear
THD::options.
---
Pulled comments back to column 49.


sql/mysql_priv.h:
  THD::options is an ulonglong, so we should define our bit constants 
  that way.
  ---
  Pulled comments back to column 49.
sql/set_var.h:
  THD::options is a ulonglong, and we if we're going to set bits higher
  than 2**31, then we must treat the bitmasks as a 64-bit number.
2007-01-26 14:47:12 -05:00
unknown
74fa02e80c Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug23721/my41-bug23721
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug23721/my50-bug23721


BitKeeper/deleted/.del-collapsed~fbec3523369aae99:
  Delete: BitKeeper/etc/collapsed
BUILD/check-cpu:
  Auto merged
BitKeeper/etc/collapsed:
  'Auto converge'
2007-01-17 13:24:20 -05:00
unknown
63cb7acee2 Bug#23721: compile fails: check-cpu mishandles cpu flags with \
hyphen in it (like ds-cpl).

convert illegal chars in cpu flags to '_' for variable assignment


BUILD/check-cpu:
  convert illegal chars in cpu flags to '_' for variable assignment
2007-01-17 13:22:50 -05:00
unknown
01e98327df Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22555/my50-bug22555
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
mysql-test/r/func_group.result:
  Manual merge.
mysql-test/t/func_group.test:
  Manual merge.
2006-12-22 16:02:54 -05:00
unknown
82bd9b6b61 Bug#22555: STDDEV yields positive result for groups with only one row
When only one row was present, the subtraction of nearly the same number 
resulted in catastropic cancellation, introducing an error in the 
VARIANCE calculation near 1e-15.  That was sqrt()ed to get STDDEV, the 
error was escallated to near 1e-8.  

The simple fix of testing for a row count of 1 and forcing that to yield 
0.0 is insufficient, as two rows of the same value should also have a
variance of 0.0, yet the error would be about the same.

So, this patch changes the formula that computes the VARIANCE to be one
that is not subject to catastrophic cancellation.

In addition, it now uses only (faster-than-decimal) floating point numbers
to calculate, and renders that to other types on demand.


mysql-test/r/func_group.result:
  Test that the bug is fixed, and that no unexpected behavior arises from the 
  changes.
mysql-test/t/func_group.test:
  Test that the bug is fixed, and that no unexpected behavior arises from the 
  changes.
sql/item_sum.cc:
  Serg's suggestion: Force all VARIANCE calculations to be done with floating-
  point types.  It's faster, and the SQL standard says we may implement these
  functions any way we want.
  
  Additionally, use a form of variance calculation that is not subject to 
  catastrophic cancellation.   
  http://static.flickr.com/108/311308512_5c4e1c0c3d_b.jpg
sql/item_sum.h:
  Remove unused members and add a comment describing the recurrence relation.
2006-12-22 15:37:37 -05:00
unknown
c789301fcd Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
BitKeeper/etc/ignore:
  auto-union
Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/rpl_deadlock.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/limit.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/rpl_deadlock.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
include/my_sys.h:
  Manual merge, my_getpagesize broken out of "#ifdef HAVE_SYS_MMAN_H"
2006-11-28 20:59:57 +01:00
unknown
87e3047501 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


mysql-test/Makefile.am:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge of changes for RPM
2006-11-24 12:12:25 +01:00
unknown
1aad990179 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my50-bug18761
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
sql/item_func.cc:
  Auto merged
2006-11-13 13:19:13 -05:00
unknown
154c6e0677 Bug#18761: constant expression as UDF parameters not passed in as constant
The code that set up data to be passed to user-defined functions was very
old and analyzed the "Type" of the data that was passed into the UDF, when
it really should analyze the "return_type", which is hard-coded for simple
Items and works correctly for complex ones like functions.
---
Added test at Sergei's behest.


mysql-test/r/udf.result:
  Verify that various arguments work.
  ---
  Added test at Sergei's behest.
mysql-test/t/udf.test:
  Verify that various arguments work.
  ---
  Added test at Sergei's behest.
sql/item_func.cc:
  For function-Items, test whether it is constant and set the struct members 
  for the UDF parameter appropriately.
  
  Replace tabs with spaces in affected code.
sql/udf_example.c:
  Include a simple function that is useful in testing.
2006-11-13 13:13:44 -05:00
unknown
1613ad2c98 Merge mysql.com:/home/bk/MERGE/mysql-4.1-merge
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


BitKeeper/triggers/post-commit:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/log_event.h:
  Manual merge
sql/slave.cc:
  Manual merge
2006-11-13 17:54:01 +01:00
unknown
181c9b4dd4 Merge mysql.com:/home/bkroot/mysql-5.0-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
2006-11-13 12:44:53 +01:00
unknown
a403c2f925 Correcting BUG/WL identifier extraction to allow multiple references to auxilary
bugs/wls in cset's comments. The targetted BUG's or WL's identifier must be specified
the first in the comments. The referred bugs wls can be typed in same as the targeted
clickable format.
If the the target of the fix is a WL and there are some references to bugs
then the first found reference is regarded as "co-target" so that the bug's identifier
comes up on the subject line along with the WL's and commit mail will update
the bug page. The latter feature can be disarmed (if there is no need to update
the referred bug's page) with typing the first a pseudo-bug pattern (bug#0).

This paticular cset will generate subject line containing bug#0 (as it was the first
referred) whereas the old version would put in the subject line the last referred
pattern (e.g bug#2147483648).


BitKeeper/triggers/post-commit:
  fixing greedyness of old extraction
2006-11-12 13:38:13 +02:00
unknown
4f4b46456a Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my41-bug22860
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my50-bug22860


BitKeeper/deleted/.del-collapsed~fbec3523369aae99:
  Delete: BitKeeper/etc/collapsed
BitKeeper/etc/collapsed:
  'Auto converge'
sql/mysqld.cc:
  manual merge
2006-11-11 08:57:26 -05:00
unknown
93e1030ddd Bug #22860: Option --memlock should be revisited
Support says that memlock doesn't work on OSes other than Solaris.  
Add a warning about --memlock to the crash monologue.


sql/mysqld.cc:
  On a crash when --memlock was active, emit advice about the insta-
  bility of that parameter.
2006-11-10 16:36:08 -05:00
unknown
c6de4d1c3b Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/ctype_utf8.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-07 12:02:53 +01:00
unknown
8f8ee04b14 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug23411/my41-bug23411
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug23411/my50-bug23411


BitKeeper/deleted/.del-collapsed~fbec3523369aae99:
  Delete: BitKeeper/etc/collapsed
BitKeeper/etc/collapsed:
  'Auto converge'
mysql-test/r/func_test.result:
  Manual merge.
mysql-test/t/func_test.test:
  Manual merge.
sql/item_func.cc:
  Manual merge.
2006-11-06 17:45:47 -05:00
unknown
2b35fee8ab Bug#23411: ... MOD-ing zero returns strange result
The Item_func_mod objects never had maybe_null set, so users had no reason 
to expect that they can be NULL, and may therefore deduce wrong results.
Now, set maybe_null.


mysql-test/r/func_test.result:
  Verify that the predictions are true.
mysql-test/t/func_test.test:
  Verify that the predictions are true.
sql/item_func.cc:
  MOD functions may be NULL.
2006-11-06 17:13:19 -05:00
unknown
fff7e9199d Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b22877


BitKeeper/etc/collapsed:
  auto-union
sql/sql_parse.cc:
  Auto merged
2006-11-01 12:34:42 +04:00
unknown
c755a7a1c4 Bug#22877 replication character sets get out of
sync using replicate-wild-ignore-table
Problem: changes in character set variables
before an action on an replication-ignored table
makes slave to forget new variable values.
Fix: initialize one_shot variables only when
4.1 -> 5.x replication is running.


mysql-test/r/rpl_ignore_table.result:
  Adding test case
mysql-test/t/rpl_ignore_table-slave.opt:
  Don't replicate tables with names starting with "tmptbl"
mysql-test/t/rpl_ignore_table.test:
  Adding test case
sql/sql_parse.cc:
  Reset one_shot variables only if we do 4.1->5.x replication.
  In other cases we cannot do that: resetting thd->variables out of sync with
  st_relay_log_info::cached_charset, which makes
  st_relay_log_info::cached_charset_compare() not to notice
  character set related variables changes afterwards.
2006-11-01 12:30:01 +04:00
unknown
4453dc48e4 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b18908


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/ctype_utf8.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
2006-10-30 10:16:18 +04:00
unknown
00c1c19e94 Bug#18908: ERROR 1406 (22001): Data too long for column :: using utf8
Problem: Too confusing error message when cannot convert
between string and column character sets on INSERT and UPDATE.
Fix: producing a better error message, instead of "Data too long"
in such cases
Additional changes: Adding "DROP TABLE IF EXISTS" into several
tests to be safe against failures in previous tests. 


mysql-test/include/strict_autoinc.inc:
  Adding DROP TABLE to be safe against previous tests failure.
mysql-test/r/ctype_recoding.result:
  Fixing test results
mysql-test/r/ctype_utf8.result:
  Fixing test results
mysql-test/r/fulltext.result:
  Fixing test results
mysql-test/r/strict_autoinc_1myisam.result:
  Adding DROP TABLE to be safe against previous tests failure.
mysql-test/r/strict_autoinc_2innodb.result:
  Adding DROP TABLE to be safe against previous tests failure.
mysql-test/r/strict_autoinc_3heap.result:
  Adding DROP TABLE to be safe against previous tests failure.
mysql-test/r/strict_autoinc_4bdb.result:
  Adding DROP TABLE to be safe against previous tests failure.
mysql-test/r/strict_autoinc_5ndb.result:
  Adding DROP TABLE to be safe against previous tests failure.
sql/field.cc:
  - producing better error messages than
    "DATA TRUNCATED" or "DATA TOO LONG" (in strict mode)
    in case of "not well formed source" and
    "cannot convert to field character set"
  - Performance improvements: copying directly to
    the target, instead of using an intermediate
    String.
  - Moving duplicate code into report_data_too_long() function.
sql/sql_string.cc:
  Adding a new function to convert strings between character sets,
  but not more than "nchar" characters - a helper function for
  Field_string::store(), Field_varstring::store() and Field_blob::store().
sql/sql_string.h:
  Adding new function prototype.
2006-10-30 10:14:03 +04:00
unknown
aff965c3b1 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug14262/my50-bug14262


BitKeeper/deleted/.del-collapsed:
  'Auto converge rename'
BitKeeper/etc/collapsed:
  'Auto converge'
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
vio/viosocket.c:
  Auto merged
sql/sql_parse.cc:
  Manual merge
sql/sql_view.cc:
  Manual merge
2006-10-13 08:57:15 -04:00
unknown
87ae7cb978 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my50-bug17583


BitKeeper/etc/collapsed:
  auto-union
client/mysql.cc:
  Auto merged
2006-10-09 18:54:48 -04:00
unknown
426b0f45a6 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my41-bug17583
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my50-bug17583


BitKeeper/deleted/.del-collapsed~fbec3523369aae99:
  Delete: BitKeeper/etc/collapsed
BitKeeper/etc/collapsed:
  'Auto converge'
client/mysql.cc:
  Auto merged
BitKeeper/deleted/.del-mysql_client.result:
  File is gone.
BitKeeper/deleted/.del-mysql_client.test:
  File is gone.
2006-10-09 18:46:28 -04:00
unknown
76b353d307 Bug#17583: mysql drops connection when stdout is not writable
When the client program had its stdout file descriptor closed by the calling
shell, after some amount of work (enough to fill a socket buffer) the server 
would complain about a packet error and then disconnect the client.

This is a serious security problem.  If stdout is closed before the mysql is
exec()d, then the first socket() call allocates file number 1 to communicate
with the server.  Subsequent write()s to that file number (as when printing
results that come back from the database) go back to the server instead in 
the command channel.  So, one should be able to craft data which, upon being
selected back from the server to the client, and injected into the command
stream become valid MySQL protocol to do something nasty when sent /back/ to 
the server.

The solution is to close explicitly the file descriptor that we *printf() to, 
so that the libc layer and the OS layer both agree that the file is closed.


BitKeeper/etc/collapsed:
  BitKeeper file /home/cmiller/work/mysql/bug17583/my41-bug17583/BitKeeper/etc/collapsed
client/mysql.cc:
  If standard output is not open (specifically, if dup() of its file number 
  fails) then we explicitly close it so that future uses of the file descriptor
  behave correctly for a closed file.
mysql-test/r/mysql_client.result:
  Prove that the problem of writing SQL output to the command socket no longer
  exists.
mysql-test/t/mysql_client.test:
  Prove that the problem of writing SQL output to the command socket no longer
  exists.
2006-10-09 18:28:06 -04:00
unknown
835fb47111 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug19356/my50-bug19356


BitKeeper/etc/collapsed:
  auto-union
2006-10-04 12:32:42 -04:00
unknown
f60ea28841 Bug#19356: Assert on undefined @uservar in prepared statement execute
The executing code had a safety assertion so that it refused to free Items
that it didn't create.  However, there is a case, undefined user variables,
which would put Items into the list to be freed.

Instead, do something that is more risky in expectation that the code will 
be refactored soon, as Kostja wants to do:  Remove the assertions from 
prepare() and execute().  Put one assertion at a higher level, before 
stmt->set_params_from_vars(), which may then create new to-be-freed Items .


mysql-test/r/ps_11bugs.result:
  Create tests to prove that undefined variables work, as keys and not, and 
  that variables explicitly assigned to Null work.
mysql-test/t/ps_11bugs.test:
  Create tests to prove that undefined variables work, as keys and not, and 
  that variables explicitly assigned to Null work.
sql/sql_prepare.cc:
  Move a safety assertion up one level and higher, because there is 
  legitimately a case where thd->free_list is not NULL going into 
  Prepared_statement::{prepare,execute} methods.
  
  Kostja plans to refactor this code so that it is both safe and works.  
  (Now it works, but isn't very safe.)
2006-10-04 11:19:23 -04:00
unknown
e6eef5c1a7 Bug #14262: SP: DROP PROCEDURE|VIEW (maybe more) write to binlog too late \
(race cond)

It was possible for one thread to interrupt a Data Definition Language 
statement and thereby get messages to the binlog out of order.  Consider:

Connection 1: Drop Foo x
Connection 2: Create or replace Foo x
Connection 2: Log "Create or replace Foo x"
Connection 1: Log "Drop Foo x"

Local end would have Foo x, but the replicated slaves would not.

The fix for this is to wrap all DDL and logging of a kind in the same mutex.  
Since we already use mutexes for the various parts of altering the server, 
this only entails moving the logging events down close to the action, inside 
the mutex protection.


BitKeeper/etc/collapsed:
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
  ---
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
  ---
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
  ---
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
  ---
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
  ---
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
  ---
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
  ---
  BitKeeper file /home/cmiller/work/mysql/bug14262/my50-bug14262/BitKeeper/etc/collapsed
sql/sp.cc:
  Move logging inside the routine drop and update functions, so it can be 
  protected by a LOCK_open mutex.  (The "create" function already had such 
  a LOCK_open protection.)
sql/sql_acl.cc:
  Move logging inside the grant functions, so that it can be protected by 
  LOCK_grant .
sql/sql_db.cc:
  Add comments that describe how each logging event is protected.
sql/sql_parse.cc:
  Move all logging statements about DDL statements close to the actual event, 
  so each can be protected by the same mutex.
sql/sql_table.cc:
  Widen the scope of the mutex so that logging events are also protected.
sql/sql_trigger.cc:
  Widen the scope of the mutex so that logging events are also protected.
sql/sql_view.cc:
  Pass the head of the table linked-list so we can create a logging statement.
  
  Move the logging statement inside the worker function, and notably inside 
  the LOCK_open mutex.  Widen the same mutex a little to make room for logging.
sql/sql_view.h:
  Pass the head of the table linked-list so we can create a logging statement.
2006-10-03 13:38:25 -04:00