An error occurred fetching the project authors.
  1. 30 Jun, 2007 1 commit
  2. 27 Jun, 2007 1 commit
    • unknown's avatar
      WL#3303 · bd4ac4b3
      unknown authored
      - undoing disable of ndb tests
      
      
      bd4ac4b3
  3. 14 Jun, 2007 1 commit
    • unknown's avatar
      WL#3303 (RBR: Engine-controlled logging format): · f3dc0478
      unknown authored
      Test case fixes.
      
      
      mysql-test/r/binlog_multi_engine.result:
        Result change.
      mysql-test/r/rpl_ndb_stm_innodb.result:
        Result change.
      mysql-test/t/binlog_multi_engine.test:
        NDB tests only work in MIXED or ROW mode. Adding some cleanup actions.
      mysql-test/t/loaddata_autocom_ndb.test:
        NDB requires MIXED or ROW mode.
      mysql-test/t/ndb_alter_table.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_alter_table2.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_alter_table3.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_autodiscover.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_autodiscover2.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_autodiscover3.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_basic.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_binlog_log_bin.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_binlog_multi.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_bitfield.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_blob.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_blob_partition.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_cache.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_cache2.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_cache_multi.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_cache_multi2.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_charset.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_condition_pushdown.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_config.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_config2.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_cursor.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_database.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_dd_alter.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_dd_backuprestore.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_dd_basic.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_dd_ddl.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_dd_disk2memory.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_dd_dump.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_dd_sql_features.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_gis.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_index.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_index_ordered.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_index_unique.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_insert.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_limit.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_loaddatalocal.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_lock.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_minmax.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_multi.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_partition_error.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_partition_key.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_partition_list.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_partition_range.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_read_multi_range.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_rename.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_replace.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_restore.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_restore_partition.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_restore_print.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_row_format.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_single_user.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_sp.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_subquery.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_temporary.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_transaction.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_trigger.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_truncate.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_types.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_update.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndb_view.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ndbapi.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/ps_7ndb.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/rpl_ndb_commit_afterflush.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/rpl_ndb_innodb_trans.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      mysql-test/t/rpl_ndb_stm_innodb.test:
        We need MIXED mode on slave since it is necessary to let the slave
        switch to row format when executing replicated statements.
      mysql-test/t/strict_autoinc_5ndb.test:
        NDB requires MIXED or ROW mode, but will switch to row format
        automatically, so we only run these tests under ROW mode.
      f3dc0478
  4. 09 Mar, 2007 1 commit
    • unknown's avatar
      Fix for BUG#735 "Prepared Statements: there is no support for Query · dca006df
      unknown authored
      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.
      
      
      mysql-test/include/have_query_cache.inc:
        Now prepared statements work with the query cache, so don't disable
        prep stmts by default when doing a query cache test. All tests which
        include this file will now be really tested against prepared
        statements (in particular, query_cache.test).
      mysql-test/r/query_cache.result:
        result update
      mysql-test/t/grant_cache.test:
        Cannot enable this test in ps-protocol, because in normal protocol,
        a SELECT failing due to insufficient privileges increments
        Qcache_not_cached, while in ps-protocol, no.
        In detail: in normal protocol,
        the "access denied" errors on SELECT are issued at (stack trace):
        mysql_parse/mysql_execute_command/execute_sqlcom_select/handle_select/
        mysql_select/JOIN::prepare/setup_wild/insert_fields/
        check_grant_all_columns/my_error/my_message_sql, which then calls
        push_warning/query_cache_abort: at this moment,
        query_cache_store_query() has been called, so query exists in cache,
        so thd->net.query_cache_query!=NULL, so query_cache_abort() removes
        the query from cache, which causes a query_cache.refused++ (thus,
        a Qcache_not_cached++).
        While in ps-protocol, the error is issued at prepare time;
        for this mysql_test_select() is called, not execute_sqlcom_select()
        (and that also leads to JOIN::prepare/etc). Thus, as
        query_cache_store_query() has not been called,
        thd->net.query_cache_query==NULL, so query_cache_abort() does nothing:
        Qcache_not_cached is not incremented.
        As this test prints Qcache_not_cached after SELECT failures,
        we cannot enable this test in ps-protocol.
      mysql-test/t/ndb_cache_multi2.test:
        The principle of this test is: two mysqlds connected to one cluster,
        both using their query cache. Queries are cached in server1
        ("select a!=3 from t1", "select * from t1"),
        table t1 is modified in server2, we want to see that this invalidates
        the query cache of server1. Invalidation with NDB works like this:
        when a query is found in the query cache, NDB is asked if the tables
        have changed. In this test, ha_ndbcluster calls NDB every millisecond
        to collect change information about tables.
        Due to this millisecond delay, there is need for a loop ("while...")
        in this test, which waits until a query1 ("select a!=3 from t1") is
        invalidated (which is equivalent to it returning
        up-to-date results), and then expects query2 ("select * from t1")
        to have been invalidated (see up-to-date results).
        But when enabling --ps-protocol in this test, the logic breaks,
        because query1 is still done via mysql_real_query() (see mysqltest.c:
        eval_expr() always uses mysql_real_query()). So, query1 returning
        up-to-date results is not a sign of it being invalidated in the cache,
        because it was NOT in the cache ("select a!=3 from t1" on line 39
        was done with prep stmts, while `select a!=3 from t1` is not,
        thus the second does not see the first in the cache). Thus, we may run
        query2 when cache still has not been invalidated.
        The solution is to make the initial "select a!=3 from t1" run
        as a normal query, this repairs the broken logic.
        But note, "select * from t1" is still using prepared statements
        which was the goal of this test with --ps-protocol.
      mysql-test/t/query_cache.test:
        now that prepared statements work with the query cache, we check
        that results in binary protocol (prepared statements) and in text
        protocol (normal queries) don't mix in the query cache even though
        the text of the statement/query are identical.
      sql/mysql_priv.h:
        In class Query_cache_flags, we add a bit to say if the result
        is in binary or text format (because, a result in binary format
        should never be served to a query expecting text format, and vice-
        versa).
        A macro to emphasize that we read the size of the query cache
        without mutex ("maybe" word).
        A macro which gives a first indication of if a query is cache-able
        (first indication - it does not consider the query cache's state).
      sql/protocol.cc:
        indentation.
      sql/protocol.h:
        Children classes of Protocol report their type (currently,
        text or binary). Query cache needs to know that.
      sql/sql_cache.cc:
        When we store a result in the query cache, we need to remember if it's
        in binary or text format. And when we search for a result in the query
        cache, we need to select only those results which are in the format
        which the current statement expects (binary or text).
      sql/sql_prepare.cc:
        Enabling use of the query cache by prepared statements.
        1) Prep stmts are of two types:
          a) prepared via the mysql_stmt_prepare() API call
          b) prepared via the SQL PREPARE...FROM statement.
        2) We already, when executing a prepared statement, sometimes built an
        "expanded" statement. For a), "?" placeholders were replaced by their
        values. For b), by names of the user variables containing the values.
        We did that only when we needed to write the query to logs.
        We now use this expanded query also for storing/searching
        in the query cache.
        Assume a query "SELECT * FROM T WHERE c=?", and the parameter is 10.
        For a), the expanded query is "SELECT * FROM T WHERE c=10", we look
        for "SELECT * FROM T WHERE c=10" in the query cache, and store that
        query's result in the query cache.
        For b), the expanded query is "SELECT * FROM T WHERE c=@somevar", and
        user variables don't work with the query cache (even inside non-
        prepared queries), so we don't enable query caching for SQL PREPARE'd
        statements if they have at least one parameter (see
        "if (stmt->param_count > 0)" in the patch).
        3) If query cache is enabled and this is a SELECT, we build the
        expanded query (as an optimisation, we don't want to build this
        expanded query if the query cache is disabled or this is not a SELECT).
        As the decision of building the expanded query or not is taken
        at prepare time (setup_set_params()), if query cache is disabled
        at prepare time, we won't build the expanded query at all next
        executions, thus shouldn't use this query for query cacheing.
        To ensure that we don't, we set safe_to_cache_query to FALSE.
        Note that we read the size of the query cache without mutex, which is
        ok: if we see it 0 but that cache has just been enlarged, no big deal,
        just our statement will not use the query cache; if we see it >0 but
        that cache has just been made destroyed, we'll build the expanded
        query at all executions, but query_cache_store_query() and
        query_cache_send_result_to_client() will read the size with a mutex
        and so properly decide to cache or not cache.
        4) Some functions in this file were named "withlog", others "with_log",
        now using "with_log" for all.
      tests/mysql_client_test.c:
        Testing of how prepared statements enter and hit the query cache.
        test_ps_query_cache() is inspired from test_ps_conj_select().
        It creates data, a prepared SELECT statement, executes it once,
        then a second time with the same parameter value, to see that cache
        is hit, then a 3rd time with another parameter value to see that cache
        is not hit. Then, same from another connection, expecting hits.
        Then, tests border cases (enables query cache at prepare and disables
        at execute and vice-versa).
        It checks all results of SELECTs, cache hits and misses.
      mysql-test/r/query_cache_sql_prepare.result:
        result of new test: we see hits when there is no parameter,
        no hit when there is a parameter.
      mysql-test/t/query_cache_sql_prepare.test:
        new test to see if SQL PREPARE'd statements enter/hit the query cache:
        - if having at least one parameter, they should not
        - if having zero parameters, they should.
      dca006df
  5. 27 Feb, 2006 1 commit
    • unknown's avatar
      Bug#16795 ndb_cache_multi2 · 701bd9ed
      unknown authored
       - Change && to ||
       - Check for return value != 0 in "ndb->init()"
      
      
      mysql-test/r/ndb_cache_multi2.result:
        Update test result
      mysql-test/t/ndb_cache_multi2.test:
        Update test case
        - add printouts for what server the queries are from
        - Run the query from "while" once on server1 to cache it
      sql/ha_ndbcluster.cc:
        && => ||, to call both the function "thd->store_global()" and "ndb->init()" 
        ndb_init returns 0 on sucess. Fail if not zero.
      701bd9ed
  6. 15 Feb, 2006 1 commit
    • unknown's avatar
      Bug#16795 ndb_cache_multi2 · 3e17193a
      unknown authored
       - remove timing dependent part of test, wait until condition occurs or sleep max 10 seconds
      
      
      mysql-test/r/ndb_cache_multi2.result:
        Update test results
      mysql-test/t/ndb_cache_multi2.test:
        Convert long sleeps to a while leep whith small sleeps and a check if condition has occured.
        This allows slower machines to sleep longer if needed.
      3e17193a
  7. 21 Apr, 2005 1 commit
  8. 21 Feb, 2005 1 commit
  9. 01 Feb, 2005 1 commit
    • unknown's avatar
      WL#2269 Enable query cache for NDB · 38e395aa
      unknown authored
      - Added a thread that fetches commit_count for open tables. This
      will mean that NDB will not have to be contacted for every use of a cached query. 
      
      
      sql/ha_ndbcluster.cc:
        Added a thread that periodically will fetch commit_count 
        for open tables and store that value in share. 
        The commit count value is then used when query cache 
        asks if a cached query can be used. 
        The thread activation interval is regulated by the 
        config variable ndb_cache_check_time, it's default value is 0
        which means that NDB is contacted every time a cached query is reused.
      sql/ha_ndbcluster.h:
        Added commit_count to share
        Added ndb_cache_check_time
      sql/mysqld.cc:
        Added config variable ndb_cache_check_time
      sql/set_var.cc:
        Added config variable ndb_cache_check_time
      38e395aa
  10. 16 Dec, 2004 1 commit
  11. 15 Dec, 2004 1 commit
    • unknown's avatar
      Added test case for multiple MySQL Servers connected to one cluster · fcca1791
      unknown authored
      Added test for cache in combination with multiple MySQL Servers
      
      
      mysql-test/include/have_ndb.inc:
        Added suport for connecting to two MySQL Server instances
        (I hope this will work on all platforms, since it does not use the socket parameter when openeing the connections, analog to how it looks like in replication tests)
      fcca1791