Commit graph

10837 commits

Author SHA1 Message Date
unknown
27d6c04b99 found typo 2004-02-22 13:04:42 +01:00
unknown
d68c56a493 Fix for BUG#2757
"--read-only gives weird error on update".
It is not fixable in 4.0 because it requires modifying
the sql/share/*/errmsg.txt files. So it is fixed in 4.1 like this:
the ER_SKIP_GRANT_TABLES is replaced by a more generic
ER_OPTION_PREVENTS_STATEMENT which can be used both for
"can't do this because of --skip-grant-tables" and
"can't do this because of --read-only" (for this we don't use
ER_CANT_UPDATE_WITH_READLOCK anymore).
So now the message for --read-only is:
"The MySQL server is running with the --read-only option so
cannot execute this statement".


include/mysqld_error.h:
  more general naming as more general message
sql/share/czech/errmsg.txt:
  message change
sql/share/danish/errmsg.txt:
  message change
sql/share/dutch/errmsg.txt:
  message change
sql/share/english/errmsg.txt:
  message change
sql/share/estonian/errmsg.txt:
  message change
sql/share/french/errmsg.txt:
  message change
sql/share/german/errmsg.txt:
  message change
sql/share/greek/errmsg.txt:
  message change
sql/share/hungarian/errmsg.txt:
  message change
sql/share/italian/errmsg.txt:
  message change
sql/share/japanese/errmsg.txt:
  message change
sql/share/korean/errmsg.txt:
  message change
sql/share/norwegian-ny/errmsg.txt:
  message change
sql/share/norwegian/errmsg.txt:
  message change
sql/share/polish/errmsg.txt:
  message change
sql/share/portuguese/errmsg.txt:
  message change
sql/share/romanian/errmsg.txt:
  message change
sql/share/russian/errmsg.txt:
  message change
sql/share/serbian/errmsg.txt:
  message change
sql/share/slovak/errmsg.txt:
  message change
sql/share/spanish/errmsg.txt:
  message change
sql/share/swedish/errmsg.txt:
  message change
sql/share/ukrainian/errmsg.txt:
  message change
sql/sql_acl.cc:
  Changes to use the more generic ER_OPTION_PREVENTS_STATEMENT
  instead of ER_SKIP_GRANT_TABLES:
  * use of net_printf() instead of send_error() (because send_error()
  does not support printf-like format).
  * in some places we now just do my_error() and return -1
  (only caller is mysql_execute_command() which does send_error()
  if result is -1).
  * Replaced my_printf_error() by simpler my_error() (except in 2 locations
  where there was a "we must use my_printf_error()" comment).
sql/sql_parse.cc:
  new error code (more generic).
2004-02-21 15:15:26 +01:00
unknown
4679b0e319 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.1438
2004-02-12 16:50:27 +04:00
unknown
eea7cbfba5 Fix for #1438 (mysql_info always returns 0)
libmysqld/lib_sql.cc:
  mysql.info set to the right value
2004-02-12 16:47:57 +04:00
unknown
1e8dcbe01f Bug#2703
"MySQL server does not detect if garbage chara at the end of query"

Allow the parser to see the garbage characters.
Garbage should cause the parser to report an error.


sql/sql_lex.cc:
  Return END_OF_INPUT when at the end of the input buffer.
  Allows the parser to determine if there is junk after a \0 character.
sql/sql_parse.cc:
  Undo 1.314.1.1 04/02/11 12:32:42 guilhem@mysql.com
sql/sql_prepare.cc:
  Undo 1.73 04/02/11 12:32:42 guilhem@mysql.com
2004-02-12 12:01:27 +00:00
unknown
f2753fe9ac Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg2248


include/mysql.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
2004-02-11 16:09:33 +03:00
unknown
7df19a0939 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into bar.intranet.mysql.r18.ru:/usr/home/bar/mysql-4.1
2004-02-11 16:55:44 +04:00
unknown
b268952faf Bug 2701: Function CHARSET() inconsistency
CONVERT3 was removed, it was for test purposes,
and rather harmful.
2004-02-11 16:53:39 +04:00
unknown
861d3f4152 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.2208


sql/sql_parse.cc:
  Auto merged
2004-02-11 16:36:33 +04:00
unknown
e5c142a412 Addition to the fix for #2208
Made code shorter and more correct


libmysql/client_settings.h:
  cli_next_result removed
libmysql/libmysql.c:
  cli_next_result removed
2004-02-11 16:35:56 +04:00
unknown
28ac1ba4ed Manual merge. 2004-02-11 15:10:54 +03:00
unknown
e2f0e8f2dc Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
2004-02-11 12:33:25 +01:00
unknown
0aa48dc500 Fix for BUG#2703
"MySQL server does not detect if garbage chars at the end of query":

Detect garbage chars at the end of the query or at the end of a query
for a prepared statement (which happens if mysql_real_query() or mysql_prepare()
were called with a too big 'length' parameter (bigger than the real intended
length of the query: then we receive a query + garbage characters from the
client). This resulted in garbage chars written into the binlog.
Now instead the client receives something like:
'You have an error in your SQL syntax.  Check the manual that corresponds
to your MySQL server version for the right syntax to use near '!stmt'
at line 1' i.e. the server is pointing at the weird tail of the query
(this '!stmt' are the garbage chars sent by the client).
All tests pass, except mysqldump.test and ctype_utf8.test but they failed
before the patch.


sql/sql_parse.cc:
  Detect garbage chars at the end of the query
  (which happens if mysql_real_query() was called with a too big 'length'
  parameter (bigger than the real intended length of the query: then
  we receive a query + garbage characters from the client).
sql/sql_prepare.cc:
  Detect garbage chars at the end of the query
  (which happens if mysql_prepare() was called with a too big 'length'
  parameter (bigger than the real intended length of the query: then
  we receive a query + garbage characters from the client).
tests/client_test.c:
  The change to sql_parse.cc and sql_prepare.cc rightfully gives many
  syntax errors to tests/client_test.c which is full of
  mysql_prepare(mysql, "SHOW TABLES", 100).
  Correcting all these commands.
2004-02-11 12:32:47 +01:00
unknown
24e3862cb8 mysqlimport.c, mysqldump.c, mysqlcheck.c, mysql.cc:
No needs to load charset index if the character set is build-in.


client/mysql.cc:
  No needs to load charset index if the character set is build-in.
client/mysqlcheck.c:
  No needs to load charset index if the character set is build-in.
client/mysqldump.c:
  No needs to load charset index if the character set is build-in.
client/mysqlimport.c:
  No needs to load charset index if the character set is build-in.
2004-02-11 15:15:39 +04:00
unknown
662510b907 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg2248
2004-02-11 12:09:48 +03:00
unknown
a47488ab18 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.2208
2004-02-11 11:01:05 +04:00
unknown
6b86e0ebc6 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
2004-02-10 23:48:17 +01:00
unknown
38caa8c060 Fix for prepared statements:
added setting of 'neg' in Item_param::set_time() (looks like the only forgotten
member).
It's the second place I find where 'neg' was forgotten.
The symptom was unexpected negative times in the binary log when running
tests/client_test.c (test_date() in fact):
# at 43009
#040210 15:46:42 server id 1  log_pos 43009     Query   thread_id=1     exec_time=0     error_code=0
SET TIMESTAMP=1076424402;
INSERT INTO test_date VALUES('2000-01-10 11:16:20','-11:16:20' etc


sql/item.cc:
  Don't forget to copy 'neg'.
2004-02-10 23:47:34 +01:00
unknown
ce8c907fcb Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2592/mysql-4.1
2004-02-11 00:56:35 +04:00
unknown
6965116320 code cleanup of processing MY_LEX_USER_VARIABLE_DELIMITER
in sql/sql_lex.cc


sql/sql_lex.cc:
  code cleanup of processing MY_LEX_USER_VARIABLE_DELIMITER
2004-02-11 00:47:18 +04:00
unknown
23103e44b4 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
2004-02-10 16:33:07 +01:00
unknown
8f5ad02a93 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg2248
2004-02-10 18:33:06 +03:00
unknown
98216bc9d4 Another implementation of send_eof() cleanup 2004-02-10 18:33:06 +03:00
unknown
f709bc1860 configure.in:
FreeBSD "ps" detection usually failed, in 90% cases,
  on FreeBSD-5.1. This change should work fine under
  5.x and 4.x, and I believe in 3.x. too. 


configure.in:
  FreeBSD "ps" detection usually failed, in 90% cases. Thi
2004-02-10 19:33:05 +04:00
unknown
86c161e6cb Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.2208


sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2004-02-10 19:33:04 +04:00
unknown
ad2c55b6ce Bug #2368 Multibyte charsets do not check that incoming data is well-formed
It was together with the previous but. This test tends to prove it.
2004-02-10 19:33:04 +04:00
unknown
186ec6c78c Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into bar.intranet.mysql.r18.ru:/usr/home/bar/mysql-4.1
2004-02-10 19:33:03 +04:00
unknown
859aedb446 Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2592/mysql-4.1


sql/sql_lex.cc:
  Auto merged
2004-02-10 19:33:02 +04:00
unknown
e4f3eb79be correcting mysql-test/r/mysqldump.result after merge
mysql-test/r/mysqldump.result:
  correcting result after merge
2004-02-10 19:29:28 +04:00
unknown
e711cc30a7 Merge
client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  e
2004-02-10 18:56:43 +04:00
unknown
aaa35925ac added skiped newline to the end of file mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test:
  added skiped newline to the end of file
2004-02-10 18:44:27 +04:00
unknown
757c8c8a62 Follow-up of a discussion on dev-docs@ :
Don't show PSEUDO_THREAD_ID in SHOW VARIABLES because:
- we don't want people to discover this variable as it could never do good to
set it (it was designed for use by mysqlbinlog only, so that a thread can have
several temp tables of the same name at the same time)
- if we show it in SHOW VARIABLES, Mysql Administrator will display it and
this will force us to put a description, so all MySQL Administrator user
will be aware of this variable, some may have the idea to set it with a SET
command, and then it will cause bad things.
The variable is still settable, and still visible with SELECT @@.


sql/set_var.cc:
  Don't show PSEUDO_THREAD_ID in SHOW VARIABLES because:
  - we don't want people to discover this variable as it could never do good to
  set it (it was designed for use by mysqlbinlog only, so that a thread can have
  several temp tables of the same name at the same time)
  - if we show it in SHOW VARIABLES, Mysql Administrator will display it and
  this will force us to put a description, so all MySQL Administrator user
  will be aware of this variable, some may have the idea to set it with a SET
  command, and then it will cause bad things.
  The variable is still settable, and still visible with SELECT @@.
2004-02-10 15:14:48 +01:00
unknown
94f215cbe1 Fixed bug #2248 "mysql_fetch without prior mysql_execute hangs"
Done clean-up in prep stmt API functions:
1) Removed some checks that were performed only in debug version
were making debug version more tolerable to user errors than 
production (and thus caused problems for example masking some
bugs). 
2) Also removed some other checks to make prep stmt API 
consistent with the rest of C API (this also in line with 
general politics - make checks in only those places where 
errors are very common and hard to spot).


include/mysql.h:
  Removed CHECK_EXTRA_ARGUMENTS define since it is no longer used 
  anywhere.
libmysql/libmysql.c:
  Added check that will cause mysql_fetch() to bark then it is 
  used without calling mysql_execute() before.
  Removed checks that were performed only in debug version and
  caused problems since they were making debug version more 
  tolerable to user errors than production. Also removed some
  other checks to make prep stmt API consistent in this regard 
  with the rest of C API (this also in line with general politics -
  make checks in only those places where errors are very common 
  and hard to spot).
tests/client_test.c:
  Updated tests to reflect removal of some checks in prep stmt API.
  Removed lines that caused bug #2473 to pop up, should be added 
  as separate test with the fix for this bug.
  Added test for bug#2248 "mysql_fetch without prior mysql_execute 
  hangs"
2004-02-10 16:58:20 +03:00
unknown
dc79294023 Wrong type of an argument was sent to my_printf_error(), which
caused UDF functions to segmenation fault when they tried to
print an error during wrong usage.
2004-02-10 13:36:21 +00:00
unknown
4138b2ac5f An include was missing.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-02-10 13:11:55 +00:00
unknown
b4fc7c7fbf Fix for #2208 (multi-query returns wrong result in embedded library)
now we execute only one first select during mysql_real_query
others - during 'mysql_next_result'


include/mysql.h:
  'virtual' next_result added
libmysql/client_settings.h:
  cli_next_result declaration added
libmysql/libmysql.c:
  mysql_next_result now works in embedded library as well
libmysqld/lib_sql.cc:
  emb_next_result implemented
sql/sql_class.h:
  fields to store the rest of the query added
sql/sql_parse.cc:
  Saving the rest of the query added for embedded case
2004-02-10 17:09:59 +04:00
unknown
102a9c6f50 http://bugs.mysql.com/bug.php?id=2368
Multibyte charsets do not check that incoming data is well-formed
2004-02-10 15:42:46 +04:00
unknown
2282ec0f81 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1
2004-02-10 02:24:10 +02:00
unknown
ecb11989ad after merge & valgrind test fixes (BUG#2120)
sql/sql_derived.cc:
  memory leack fixed
sql/sql_lex.cc:
  flag to avoid double cleaning
sql/sql_lex.h:
  flag to avoid double cleaning
sql/sql_select.cc:
  right way to cleanup JOIN_TAB
sql/sql_select.h:
  right way to cleanup JOIN_TAB
sql/sql_union.cc:
  flag to avoid double cleaning
2004-02-10 02:18:22 +02:00
unknown
d5b3cb44b9 Fix for the rpl_until.test.
Don't use --command in tests; use command.


mysql-test/r/rpl_until.result:
  result update
mysql-test/t/rpl_until.test:
  real-sleep is incorrect syntax; mysqltest knows only real_sleep.
  Tip: don't use -- before commands; if mysqltest does not recognize the command
  after -- it just says "it must be a comment", so there is no syntax error detection.
  If you don't use the -- it will report the syntax error.
  The typo caused no sleep, so the slave did not have time to stop.
  Now it has time so we needn't replace the Slave_SQL_Running
  (and it's better to not replace it, because if we don't see that it
  is running, it will trigger errors just a bit later).
2004-02-09 23:47:28 +01:00
unknown
da81724aa0 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-root
2004-02-09 16:40:20 +03:00
unknown
c4d0631b51 switch off SERVER_MORE_RESULTS_EXISTS, but
don't set other flags: it breaks future extensions
2004-02-09 16:26:38 +03:00
unknown
d4767576f8 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1


mysql-test/r/derived.result:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2004-02-09 15:01:51 +02:00
unknown
74b81a8017 Ensure that result from date_format() is binary
Removed warnings from test suite


mysql-test/r/ctype_utf8.result:
  Update results after fix of return argument from date_format()
mysql-test/r/date_formats.result:
  Remove unnecessary warnings
mysql-test/r/type_decimal.result:
  Remove unnecessary warnings
mysql-test/r/warnings.result:
  Remove unnecessary warnings
mysql-test/t/ctype_utf8.test:
  Fixed test
mysql-test/t/date_formats.test:
  Remove unnecessary warnings
mysql-test/t/type_decimal.test:
  Remove unnecessary warnings
mysql-test/t/warnings.test:
  Remove unnecessary warnings
sql/field.cc:
  Optimize
sql/item_timefunc.cc:
  Ensure that result from date_format() is binary
strings/ctype-simple.c:
  Better names for arguments
2004-02-09 13:59:41 +01:00
unknown
61f0e69cb6 ufter revview fix (BUG#2120)
mysql-test/r/derived.result:
  test of error handling in derived tables with UPDATE & DELETE
mysql-test/t/derived.test:
  test of error handling in derived tables with UPDATE & DELETE
sql/mysql_priv.h:
  opened tables counter added to avoid loop of tables calculating in lock_tables
sql/sql_acl.cc:
  opened tables counter added to avoid loop of tables calculating in lock_tables, here it is just for compatibility
sql/sql_base.cc:
  removed unneeded assignment
  opened tables counter added to avoid loop of tables calculating in lock_tables
  commentary fixed
sql/sql_derived.cc:
  mysql_derived made static
  variable res moved in place where it used
  priveleges written in correct place
sql/sql_handler.cc:
  opened tables counter added to avoid loop of tables calculating in lock_tables
sql/sql_parse.cc:
  mistyping in commentary fixed
2004-02-09 14:44:03 +02:00
unknown
1c810278bd merge 2004-02-09 12:35:01 +01:00
unknown
35b1f54450 Added --compact to mysqlbinlog
Fixed output from mysqlbinlog when using --skip-comments
Fixed warnings from valgrind
Fixed ref_length when used with HEAP tables
More efficent need_conversion()
Fixed error handling in UPDATE with not updateable tables
Fixed bug in null handling in CAST to signed/unsigned



client/client_priv.h:
  cleanup & added OPT_COMPACT
client/mysqldump.c:
  Added option --compact to get a compact readable dump.
  Ensure that SET CHARACTER_SET_CLIENT is not done if we have not remembered the old character set
  Print optimization comments even if --skip-comments are given as these are not true comments. (Before these where only printed at end, which was a bug)
mysql-test/r/cast.result:
  More cast tests
mysql-test/r/derived.result:
  Removed warnings
mysql-test/r/mysqldump.result:
  Update results after fixing mysqlbinlog
mysql-test/r/query_cache.result:
  Make test usable with --extern
  more tests
mysql-test/r/rpl_until.result:
  Make test repeatable under valgrind
mysql-test/r/sql_mode.result:
  Fix test result
mysql-test/r/subselect.result:
  Make test smaller. Update wrong results
mysql-test/t/cast.test:
  More cast tests
mysql-test/t/derived.test:
  Removed warnings
mysql-test/t/query_cache.test:
  Make test usable with --extern
  more tests
mysql-test/t/rpl_until.test:
  fix for valgrind.  Becasue of unknown reason one got 'Slave_SQL_Running=yes' in this setup
mysql-test/t/subselect.test:
  Make test case smaller
sql/field.cc:
  Updated need_conversion() to use new arguments
sql/ha_heap.cc:
  Moved initialization of ref_length to right place. This fixed problem that we had a ref_length of 8 for heap tables, which was not efficent.
sql/item_func.cc:
  Cleanup
sql/item_func.h:
  Fixed bug in null_handling for cast to signed/unsigned
sql/item_strfunc.cc:
  Optimized/cleaned up Item_func_conv_charset3
sql/item_sum.cc:
  Cleanup.
  Ensure that some flag variables are cleared in cleanup()
sql/item_sum.h:
  Fixed references to uninitialized memory
sql/opt_range.cc:
  Fixed spelling error
sql/sql_class.cc:
  Fixed wrong return code, which could case protocol problems
sql/sql_class.h:
  After merge fix
sql/sql_prepare.cc:
  Added comments
sql/sql_show.cc:
  Cleanup
sql/sql_string.cc:
  Optimzed usage of need_conversion().
  - Removed not used argument
  - Save diff lenght in 'offset' to not have to recalculate length several times.
  Cleaned up comment
  Optimized copy_aligned() based on the knowledge that it's only called when you have wrong data
sql/sql_string.h:
  Updated need_conversion() and copy_aligned() to use new arguments
sql/sql_update.cc:
  Fixed error handling with non-updateable tables
sql/sql_yacc.yy:
  Ensure that lex->lock_options are set correctly (to get rid of warnings from valgrind)
  Ensure that cast_type sets lex->charset and lex->length. Without these CONVERT() didn't work properly
2004-02-09 12:31:03 +01:00
unknown
584ddfdab2 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1


sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
2004-02-09 12:10:12 +02:00
unknown
a54adfc3ab fixed bug #2592 mysqldump doesn't quote "tricky" names correctly
mysql-test/r/mysqldump.result:
  added test for 
  bug #2592 mysqldump doesn't quote "tricky" names correctly
  please note, output's still looking wrong because of bug #2593
  it will be fixed when fix for bug #2593 will be pushed
mysql-test/t/mysqldump.test:
  added test for bug 
  #2592 mysqldump doesn't quote "tricky" names correctly
sql/sql_lex.cc:
  fixed processing of multibyte quoted variables
2004-02-07 02:22:12 +04:00
unknown
faa8a41b1d Problem fix:
http://bugs.mysql.com/bug.php?id=2366
Wrong utf8 behaviour when data is trancated
2004-02-06 16:59:25 +04:00