Commit graph

21520 commits

Author SHA1 Message Date
anozdrin/alik@quad.opbmk
1298b1f3c0 Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2008-03-25 14:54:08 +03:00
anozdrin/alik@quad.opbmk
bb7a9a008c Fix for Bug#34274: Invalid handling of 'DEFAULT 0'
for YEAR data type.

The problem was that for some unknown reason 0 was not allowed
as a default value for YEAR data type. That was coded before BK.
However the Manual does not say a word about such a limitation.
Also, it looks inconsistent with other data types.

The fix is to allow 0 as a default value.
2008-03-22 11:32:24 +03:00
anozdrin/alik@quad.opbmk
032428428c Fix result files (Bug#21854). 2008-03-22 11:01:31 +03:00
anozdrin/alik@quad.opbmk
1b8fb7733a A patch for Bug#21854: Problems with CREATE TRIGGER without
DEFINER clause in --skip-grant-tables mode.

Update error message.
2008-03-21 18:34:12 +03:00
anozdrin/alik@quad.opbmk
c7a0540db2 Fix tree. 2008-03-21 10:52:00 +03:00
anozdrin/alik@quad.
edd58be55d A test case for Bug#29958: Weird message on DROP DATABASE
if mysql.proc does not exist.
2008-03-20 11:36:35 +03:00
anozdrin/alik@quad.opbmk
fa6ed3cf36 Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2008-03-18 13:51:17 +03:00
anozdrin/alik@quad.
393c54db50 Avoid races in connect.test.
The problem was in a test case for Bug33507:
  - when the number of active connections reaches the limit,
    the server accepts only root connections. That's achieved by
    accepting a connection, negotiating with the client and
    checking user credentials. If it is not SUPER, the connection
    is dropped.
  - when the server accepts connection, it increases the counter;
  - when the server drops connection, it decreases the counter;
  - the race was in between of decreasing the counter and accepting
    new connection:
    - max_user_connections = 2;
    - 2 oridinary user connections accepted;
    - extra user connection is establishing;
    - server checked user credentials, and sent 'Too many connections'
      error;
    - the client receives the error and establishes extra SUPER user
      connection;
    - the server however didn't decrease the counter (the extra
      user connection still is "alive" in the server) -- so, the new
      SUPER-user connection, will be dropped, because it exceeds
      (max_user_connections + 1).

The fix is to implement "safe connect", which makes several attempts
to connect and use it in the test script.
2008-03-17 14:26:00 +03:00
mkindahl@dl145h.mysql.com
9baeb72ee6 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
2008-03-14 18:32:01 +01:00
mkindahl@dl145h.mysql.com
f48aa05fd0 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
2008-03-14 18:18:14 +01:00
mkindahl@dl145h.mysql.com
c5fefc688c Post-merge fixes. 2008-03-14 17:52:57 +01:00
anozdrin/alik@quad.
d3575ce0e4 A fix for Bug#35289: Too many connections -- wrong SQL state
in some case.

ER_CON_COUNT_ERROR is defined with SQL state 08004. However, this SQL state is not always
returned.

This error can be thrown in two cases:

  1. when an ordinary user (a user w/o SUPER privilege) is connecting,
    and the number of active user connections is equal or greater than
    max_connections.

  2. when a user is connecting and the number of active user connections is
    already (max_connections + 1) -- that means that no more connections will
    be accepted regardless of the user credentials.

In the 1-st case, SQL state is correct.

The bug happens in the 2-nd case -- on UNIX the client gets 00000 SQL state, which is
absolutely wrong (00000 means "not error SQL state); on Windows
the client accidentally gets HY000 (which means "unknown SQL state).

The cause of the problem is that the server rejects extra connection
prior to read a packet with client capabilities. Thus, the server
does not know if the client supports SQL states or not (if the client
supports 4.1 protocol or not). So, the server supposes the worst and
does not send SQL state at all.

The difference in behavior on UNIX and Windows occurs because on Windows
CLI_MYSQL_REAL_CONNECT() invokes create_shared_memory(), which returns
an error (in default configuration, where shared memory is not configured).
Then, the client does not reset this error, so when the connection is
rejected, SQL state is HY000 (from the error from create_shared_memory()).

The bug appeared after test case for Bug#33507 -- before that, this behavior
just had not been tested.

The fix is to 1) reset the error after create_shared_memory();
2) set SQL state to 'unknown error' if it was not received from
the server.

A separate test case is not required, since the behavior is already
tested in connect.test.

Note for doc-team: the manual should be updated to say that under
some circumstances, 'Too many connections' has HY000 SQL state.
2008-03-14 15:58:27 +03:00
davi@endora.local
9e9cd68f29 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
2008-03-13 14:56:25 -03:00
davi@mysql.com/endora.local
c964c0b2cf Bug#34891 sp_notembedded.test fails sporadically
The problem is that since MyISAM's concurrent_insert is on by
default some concurrent SELECT statements might not see changes
made by INSERT statements in other connections, even if the
INSERT statement has returned.

The solution is to disable concurrent_insert so that INSERT
statements returns after the data is actually visible to other
statements.
2008-03-13 14:54:29 -03:00
anozdrin/alik@quad.
5c1e58d4fa Fix for Bug#35074: max_used_connections is not correct.
The problem was that number of threads was used to calculate
max_used_connections.

The fix is to use number of active connections.
2008-03-13 12:02:12 +03:00
anozdrin/alik@quad.
18125abf93 Fix for Bug#33507: Event scheduler creates more threads
than max_connections -- which results in user lockout.

The problem was that the variable thread_count that contains
the number of active threads was interpreted as a number of
active connections.

The fix is to introduce a new counter for active connections.
2008-03-12 17:44:40 +03:00
kaa@kaamos.(none)
06bf29cf0f Fixed test failures caused by insufficient cleanups in the tests for
bug12713.
2008-03-12 16:52:29 +03:00
anozdrin/alik@quad.
44d814f58c Merge quad.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2008-03-12 16:29:00 +03:00
anozdrin/alik@quad.
2b09a99340 A fix for Bug#34643: TRUNCATE crash if trigger and foreign key.
In cases when TRUNCATE was executed by invoking mysql_delete() rather
than by table recreation (for example, when TRUNCATE was issued on
InnoDB table with is referenced by foreign key) triggers were invoked.
In debug builds this also led to crash because of an assertion, which
assumes that some preliminary actions take place before trigger 
invocation, which doesn't happen in case of TRUNCATE.

The fix is not to execute triggers in mysql_delete() when this
function is used by TRUNCATE.
2008-03-12 16:13:33 +03:00
mkindahl@dl145h.mysql.com
b5ebc67855 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
2008-03-12 13:07:35 +01:00
kaa@kaamos.(none)
9c811ddec9 Post-merge fix. 2008-03-12 13:22:58 +03:00
kaa@kaamos.(none)
ae93d258aa Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-12 11:21:12 +03:00
kaa@kaamos.(none)
0a7052e4d3 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-12 11:19:46 +03:00
kaa@kaamos.(none)
d0eb90501d Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-03-12 10:59:15 +03:00
sven@riska.(none)
38b406cec8 Removed pushbuild errors.
Problem: rpl_variables_stm.test used a character set and a collation which
are not included on all platforms.
Fix: replace the character set and collation by ones that are included on
all platforms. (rpl_variables_stm does not rely on which character set is
used, the only important aspect is the fact that it changes.)
2008-03-11 18:43:29 +01:00
kaa@kaamos.(none)
7e365efa30 Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-11 15:47:16 +03:00
holyfoot/hf@hfmain.(none)
e0851650e1 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/32801/my51-32801
2008-03-11 11:20:36 +04:00
thek@adventure.(none)
31ff514ea2 Merge adventure.(none):/home/thek/Development/cpp/bug25132/my50-bug25132
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
2008-03-10 16:46:38 +01:00
sven@riska.(none)
f0a9d75a6c Problem: sporadic pushbuild errors in rpl_ndb_basic.
The reason is that we are using a sleep to wait for slave to reach the
slave_transaction_retries limit.
Fix: wait for the slave to stop instead. This is what we want to do, since
the slave stops when the limit is reached.
2008-03-10 16:24:12 +01:00
sven@riska.(none)
afde9893b1 Problem: Pushbuild errors because sql_mode is unsafe but test thinks it is
safe.
Fix: Move sql_mode: from the section of the test where safe variables are
tested, to the section where unsafe variables are tested.
2008-03-10 15:26:21 +01:00
tnurnberg@white.intern.koehntopp.de
f5b93ab932 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/34749/51-34749
2008-03-10 07:39:04 +01:00
tnurnberg@white.intern.koehntopp.de
3a87bbfe42 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/34749/50-34749
2008-03-10 07:11:12 +01:00
tnurnberg@white.intern.koehntopp.de
fd2bae9981 Merge mysql.com:/misc/mysql/34749/50-34749
into  mysql.com:/misc/mysql/34749/51-34749
2008-03-10 07:07:56 +01:00
aelkin/andrei@mysql1000.(none)
8a4c652199 Bug #26622 MASTER_POS_WAIT does not work as documented
Affected tests fixing. After the fix for st_relay_log_info::wait_for_pos() that
handles widely used select('master-bin.xxxx',pos) invoked by mysqltest
there appeared to be four tests that either tried synchronizing when
the slave was stopped or used incorrect synchronization method like
to call `sync_with_master' from the current connection being to the
master itself.

Fixed with correcting the current connection or/and using the correct
synchronization macro when possible.
2008-03-07 21:14:28 +02:00
sven@riska.(none)
81b1d712bf BUG#31168: @@hostname does not replicate
Problem: in mixed and statement mode, a query that refers to a
system variable will use the slave's value when replayed on
slave. So if the value of a system variable is inserted into a
table, the slave will differ from the master.
Fix: mark statements that refer to a system variable as "unsafe",
meaning they will be replicated by row in mixed mode and produce a warning
in statement mode. There are some exceptions: some variables are actually
replicated. Those should *not* be marked as unsafe.
BUG#34732: mysqlbinlog does not print default values for auto_increment variables
Problem: mysqlbinlog does not print default values for some variables,
including auto_increment_increment and others. So if a client executing
the output of mysqlbinlog has different default values, replication will
be wrong.
Fix: Always print default values for all variables that are replicated.
I need to fix the two bugs at the same time, because the test cases would
fail if I only fixed one of them.
2008-03-07 13:59:36 +01:00
aelkin/andrei@mysql1000.(none)
9c2ef8377f Bug #28780 report_host is not available through SELECT @@report_host
merging and post-make-test changes.
2008-03-07 14:39:37 +02:00
gkodinov/kgeorge@magare.gmz
dbc3ef6c9f Merge magare.gmz:/home/kgeorge/mysql/work/B34909-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B34909-5.1-opt
2008-03-07 11:19:51 +02:00
gkodinov/kgeorge@magare.gmz
560ec24079 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B34909-5.0-opt
2008-03-07 11:17:31 +02:00
gkodinov/kgeorge@magare.gmz
11cd97ed6b Bug #34909: mysqldump returns a 0 status on error when using
--master-data

No error code was returned by mysqldump if it detects that binary
logging is not enabled on the server.
Fixed by returning error code.
2008-03-07 11:15:49 +02:00
aelkin/andrei@mysql1000.(none)
93737d3f7a Merge mysql1000.(none):/home/andrei/MySQL/FIXES/5.1/bug22234-Extra_Slave_Col_Slave_should_stop_on_Error_Field
into  mysql1000.(none):/home/andrei/MySQL/MERGE/5.1
2008-03-06 20:35:59 +02:00
aelkin/andrei@mysql1000.(none)
65bb7d3e2d Merge mysql1000.(none):/home/andrei/MySQL/FIXES/5.1/bug28780_report_host_no_show
into  mysql1000.(none):/home/andrei/MySQL/MERGE/5.1
2008-03-06 20:33:29 +02:00
aelkin/andrei@mysql1000.(none)
7d0a83ce1e Bug #22234 Extra Slave Col: Slave should stop on Error Field d of table
There was a failure in that show slave status displayed a wrong message
when slave stopped at processing a row event inserting to a default-less
column.

The problem seem to have ceased after recent fixes in rbr code.
However, the test was not updated to carry testing of the case commented-out.

Uncommenting and editing the test.
Notice, Bug#23907 is most probably a duplicate of this one.
2008-03-06 20:32:47 +02:00
aelkin/andrei@mysql1000.(none)
122fefc593 Bug#26622 MASTER_POS_WAIT does not work as documented
MASTER_POS_WAIT return values are different than expected when the server is not a slave. 
It returns -1 instead of NULL.

Fixed with correcting  st_relay_log_info::wait_for_pos() to return the proper
value in the case of rli info is not inited.
2008-03-06 14:49:21 +02:00
thek@adventure.(none)
a13cba5abd Bug#25132 disabled query cache: Qcache_free_blocks = 1
The initial value of free memory blocks in 0. When the query cache is enabled 
a new memory block gets allocated and is assigned number 1. The free memory
block is later split each time query cache memory is allocated for new blocks.
This means that the free memory block counter won't be reduced to zero when
the number of allocated blocks are zero, but rather one. To avoid confusion
this patch changes this behavior so that the free memory block counter is
reset to zero when the query cache is disabled.
Note that when the query cache is enabled and resized the free memory block
counter was still calculated correctly.
2008-03-06 12:40:46 +01:00
mkindahl@dl145h.mysql.com
51ad2901d4 Adding missing drop of view last in test. 2008-03-05 14:45:40 +01:00
mkindahl@dl145h.mysql.com
9b54edd28e Updating result file. 2008-03-05 13:59:32 +01:00
aelkin/andrei@mysql1000.(none)
0958a508f8 Bug #28780 report_host is not available through SELECT @@report_host
There was no way to see if report-{host,port,user,password} were set up.

Fixed with introducing new global variables.
The variables are made read-only because of a possible need to change them
most probably require the slave server restart.

Todo: transform the startup options to be CHANGE master parameters - i.e
to deprecate `report-' options, and to change the new vars 
to be updatable at time of CHANGE master executes with new
values.
2008-03-05 12:25:55 +02:00
mkindahl@dl145h.mysql.com
15e7050499 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
2008-03-05 10:16:20 +01:00
mkindahl@dl145h.mysql.com
57f6c4b362 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-03-05 09:42:26 +01:00
davi@mysql.com/endora.local
777a143833 Use the same name for mysql_client_test output file in all branches. 2008-03-04 10:32:30 -03:00